[][src]Function arrayfire::print

pub fn print<T: HasAfEnum>(input: &Array<T>)

Print data in the Array

Parameters

Examples

use arrayfire::{Dim4, print, randu};
println!("Create a 5-by-3 matrix of random floats on the GPU");
let dims = Dim4::new(&[5, 3, 1, 1]);
let a = randu::<f32>(dims);
print(&a);

The sample output will look like below:

[5 3 1 1]
    0.7402     0.4464     0.7762
    0.9210     0.6673     0.2948
    0.0390     0.1099     0.7140
    0.9690     0.4702     0.3585
    0.9251     0.5132     0.6814