pub trait DimArr<T>: AsRef<[T]> + AsMut<[T]> {
// Required method
fn zeros(ndim: usize) -> Self;
}Available on crate feature
ndarray only.Expand description
An abstraction over fixed-size arrays and regular vectors if the alloc feature is enabled.
Required Methods§
Sourcefn zeros(ndim: usize) -> Self
fn zeros(ndim: usize) -> Self
Create an array of zeros with the given number of dimensions.
§Panics
Panics if the given number of dimensions is not supported by the array. For example, if the array is a fixed size array of size 3, it will panic if the given number of dimensions is 4. Regular vectors will never panic.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.