Trait NumpyArray

Source
pub trait NumpyArray: Sized {
    type Elem: NumpyArrayElement;
    type Iter: Iterator<Item = Self::Elem>;

    // Required methods
    fn npy_shape(&self) -> Vec<usize>;
    fn npy_elements(self) -> Self::Iter;
}

Required Associated Types§

Required Methods§

Source

fn npy_shape(&self) -> Vec<usize>

Source

fn npy_elements(self) -> Self::Iter

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.

Implementations on Foreign Types§

Source§

impl<'a, A: NumpyArrayElement + Clone> NumpyArray for &'a [A]

Source§

type Elem = A

Source§

type Iter = OwnedIter<'a, A, <&'a [A] as IntoIterator>::IntoIter>

Source§

fn npy_shape(&self) -> Vec<usize>

Source§

fn npy_elements(self) -> Self::Iter

Source§

impl<'a, A: NumpyArrayElement + Clone> NumpyArray for &'a Vec<A>

Source§

type Elem = A

Source§

type Iter = OwnedIter<'a, A, <&'a Vec<A> as IntoIterator>::IntoIter>

Source§

fn npy_shape(&self) -> Vec<usize>

Source§

fn npy_elements(self) -> Self::Iter

Source§

impl<A: NumpyArrayElement> NumpyArray for Vec<A>

Implementors§