[][src]Function numas::factory::fill::zeroes

pub fn zeroes<T: Copy + From<u8>>(shape: Vec<i32>) -> Array<T>

Creates new array of given shape filled with zeros

Arguments

  • shape - shape of new array

Examples

 use numas::array::Array;
 use numas::shape::Shape;

 let array = numas::factory::fill::zeroes::<f64>(vec![2, 2]);
 let data = array.collect();

 assert_eq!(data, vec![0.0 as f64; 4]);