Struct ndarray_npy::NpzReader [] [src]

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

Reader for .npz files.

Example

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

use ndarray::prelude::*;
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")?;

Methods

impl<R: Read + Seek> NpzReader<R>
[src]

[src]

Creates a new .npz file reader.

[src]

Returns the number of arrays in the .npz file.

[src]

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

[src]

Reads an array by name.

[src]

Reads an array by index in the .npz file.

Trait Implementations

Auto Trait Implementations

impl<R> Send for NpzReader<R> where
    R: Send

impl<R> Sync for NpzReader<R> where
    R: Sync