pub trait NDArrayRead: NDArray + Debug + Sized {
    // Required methods
    fn buffer(&self) -> Result<BufferConverter<'_, Self::DType>, Error>;
    fn into_read(
        self
    ) -> Result<Array<Self::DType, AccessBuf<<Self::Platform as Convert<Self::DType>>::Buffer>, Self::Platform>, Error>
       where Self::Platform: Convert<Self::DType>;
    fn read_value(&self, coord: &[usize]) -> Result<Self::DType, Error>;
}
Expand description

Access methods for an NDArray

Required Methods§

source

fn buffer(&self) -> Result<BufferConverter<'_, Self::DType>, Error>

Read the value of this NDArray into a BufferConverter.

source

fn into_read( self ) -> Result<Array<Self::DType, AccessBuf<<Self::Platform as Convert<Self::DType>>::Buffer>, Self::Platform>, Error>
where Self::Platform: Convert<Self::DType>,

Buffer this NDArray into a new, owned array, allocating only if needed.

source

fn read_value(&self, coord: &[usize]) -> Result<Self::DType, Error>

Read the value at a specific coord in this NDArray.

Object Safety§

This trait is not object safe.

Implementors§