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

pub fn full<T: Copy>(value: T, shape: Vec<i32>) -> Array<T>

Creates new array of given shape filled with given value

Arguments

  • value - value to fill array with
  • shape - shape of new array

Examples

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

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

 assert_eq!(data, vec![3; 4]);