pub fn new(shape: impl Into<Shape>) -> Self
    where
        T: Copy,
    {
        let shape = shape.into();
        let len: usize = shape.span();
        #[allow(clippy::uninit_assumed_init)]
        let values = (0..len)
            .map(|_| unsafe { MaybeUninit::uninit().assume_init() })
            .collect();

        Self::new_with_values(shape, values).unwrap()
    }
/// Created a new array with shape and uninitialized data.
Created a new array with shape and uninitialized data.
Created a new array with shape and uninitialized data .
pub fn new(shape: impl Into<Shape>) -> Self
    where
        T: Copy,
    {
        let shape = shape.into();
        let len: usize = shape.span();
        #[allow(clippy::uninit_assumed_init)]
        let values = (0..len)
            .map(|_| unsafe { MaybeUninit::uninit().assume_init() })
            .collect();
        Self::new_with_values(shape, values).unwrap()
    }
pub fn new ( shape : impl Into < Shape > ) -> Self where T : Copy , { let shape = shape . into ( ) ; let len : usize = shape . span ( ) ; # [ allow ( clippy uninit_assumed_init ) ] let values = ( 0 .. len ) . map ( | _ | unsafe { MaybeUninit :: uninit ( ) . assume_init ( ) } ) . collect ( ) ; Self :: new_with_values ( shape , values ) . unwrap ( ) }
Created a new array with shape and uninitialized data.
Created a new array with shape and uninitialized data .
shape
impl Into<Shape>