[][src]Trait ndarray_npy::WriteNpyExt

pub trait WriteNpyExt {
    fn write_npy<W: Write>(&self, writer: W) -> Result<(), WriteNpyError>;
}

Extension trait for writing ArrayBase to .npy files.

Example

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

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

let arr: Array2<i32> = array![[1, 2, 3], [4, 5, 6]];
let writer = File::create("array.npy")?;
arr.write_npy(writer)?;

Required methods

fn write_npy<W: Write>(&self, writer: W) -> Result<(), WriteNpyError>

Writes the array to writer in .npy format.

Loading content...

Implementations on Foreign Types

impl<A, S, D> WriteNpyExt for ArrayBase<S, D> where
    A: WritableElement,
    S: Data<Elem = A>,
    D: Dimension
[src]

Loading content...

Implementors

Loading content...