[−][src]Crate ndarray_npy
This crate provides methods to read/write ndarray
's ArrayBase
type
from/to .npy
and .npz
files.
See the ReadNpyExt
and WriteNpyExt
extension traits or the
read_npy
and write_npy
convenience functions for reading/writing
.npy
files.
See NpzReader
and NpzWriter
for reading/writing .npz
files.
See the repository for information about the default features and how to use this crate with Cargo.
Limitations
-
Parsing of
.npy
files is currently limited to files where thedescr
field of the header dictionary is a Python string literal of the form'string'
,"string"
,'''string'''
, or"""string"""
. -
WritableElement
andReadableElement
are currently implemented only for fixed-size integers, floating point numbers, andbool
.
The plan is to add support for more element types (including custom user-defined structs) in the future.
Structs
NpzReader | Reader for |
NpzWriter | Writer for |
Enums
ReadDataError | An error reading array data. |
ReadNpyError | An error reading a |
ReadNpzError | An error reading a |
WriteDataError | An error writing array data. |
WriteNpyError | An error writing a |
WriteNpzError | An error writing a |
Traits
ReadNpyExt | Extension trait for reading |
ReadableElement | An array element type that can be read from an |
WritableElement | An array element type that can be written to an |
WriteNpyExt | Extension trait for writing |
Functions
read_npy | Read an |
write_npy | Writes an array to an |