[][src]Function ndarray_npy::read_npy

pub fn read_npy<P, T>(path: P) -> Result<T, ReadNpyError> where
    P: AsRef<Path>,
    T: ReadNpyExt

Read an .npy file located at the specified path.

This is a convience function for using File::open followed by ReadNpyExt::read_npy.

Example

use ndarray::Array2;
use ndarray_npy::read_npy;

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