Trait NDArray

Source
pub trait NDArray: Send + Sync {
    type DType: CType;
    type Platform: PlatformInstance;

    // Required method
    fn shape(&self) -> &[usize];

    // Provided methods
    fn ndim(&self) -> usize { ... }
    fn size(&self) -> usize { ... }
}
Expand description

An n-dimensional array

Required Associated Types§

Source

type DType: CType

The data type of the elements in this array

Source

type Platform: PlatformInstance

The platform used to construct operations on this array.

Required Methods§

Source

fn shape(&self) -> &[usize]

Borrow the shape of this array.

Provided Methods§

Source

fn ndim(&self) -> usize

Return the number of dimensions in this array.

Source

fn size(&self) -> usize

Return the number of elements in this array.

Implementors§