[][src]Trait ndarray_npy::ReadNpyExt

pub trait ReadNpyExt: Sized {
    fn read_npy<R: Read>(reader: R) -> Result<Self, ReadNpyError>;
}

Extension trait for reading Array from .npy files.

Example

#[macro_use]
extern crate ndarray;
extern crate ndarray_npy;

use ndarray::prelude::*;
use ndarray_npy::ReadNpyExt;
use std::fs::File;

let reader = File::open("array.npy")?;
let arr = Array2::<i32>::read_npy(reader)?;

Required methods

fn read_npy<R: Read>(reader: R) -> Result<Self, ReadNpyError>

Reads the array from reader in .npy format.

Loading content...

Implementations on Foreign Types

impl<A, S, D> ReadNpyExt for ArrayBase<S, D> where
    A: ReadableElement,
    S: DataOwned<Elem = A>,
    D: Dimension
[src]

Loading content...

Implementors

Loading content...