Trait relearn::utils::array::BasicArray[][src]

pub trait BasicArray<T, const N: usize> {
    fn zeros(shape: [usize; N]) -> Self;
fn ones(shape: [usize; N]) -> Self; fn allocate(shape: [usize; N]) -> (Self, bool)
    where
        Self: Sized
, { ... } }
Expand description

A basic multidimensional array with simple operations.

Required methods

Create a zero-initialized array with the given shape.

Create a one-initialized array with the given shape.

Provided methods

Allocate a new array with the given shape.

Also returns a boolean indiciating whether the array is zero-initialized (true) or contains arbitrary values (false).

Implementations on Foreign Types

Implementors