Module dfdx::numpy

source · []
Expand description

Provides some generic functions to load & save Nd arrays in the .npy format. See load() and save()

Enums

Traits

Represents the NumpyDtype as a const str value.

A type that implements this returns a vec of usize that can represent a tuple of ints in a .npy file.

Reads all the numbers from r into &mut self assuming the bytes are layed out in Endian order. Most types that this should be implemented for have Self::from_be_bytes(), Self::from_le_bytes(), and Self::from_ne_bytes().

Write all the numbers in &self with the bytes layed out in Endian order. Most types that this should be implemented for have .to_be_bytes(), .to_le_bytes(), and .to_ne_bytes().

Functions

Loads data from a .npy file. This calls read().

Reads data from a Read.

Saves the data to a .npy file. This calls write().

Writes the data to a Write.