Struct ndarray_npy::NpzReader[][src]

pub struct NpzReader<R: Read + Seek> { /* fields omitted */ }
Expand description

Reader for .npz files.

Example

use ndarray::{Array1, Array2};
use ndarray_npy::NpzReader;
use std::fs::File;

let mut npz = NpzReader::new(File::open("arrays.npz")?)?;
let a: Array2<i32> = npz.by_name("a")?;
let b: Array1<i32> = npz.by_name("b")?;

Implementations

Creates a new .npz file reader.

Returns true iff the .npz file doesn’t contain any arrays.

Returns the number of arrays in the .npz file.

Returns the names of all of the arrays in the file.

Reads an array by name.

Reads an array by index in the .npz file.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.