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]

Creates a new .npz file reader.

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

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

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