numir.io

NumPy file IO package

Members

Functions

enforceNPY
auto enforceNPY(string magic, string path)

validate the magic numbers in npy file header

loadNpy
auto loadNpy(string path)

load numpy format file into mir.ndslice.Slice

npyHeader
string npyHeader(S x)

create numpy format header from mir.ndslice.Slice

parseHeader
auto parseHeader(string header, string path)
Undocumented in source. Be warned that the author may not have intended to support it.
readBytes
auto readBytes(File file, string dtype, size_t size)

read bytes from file with dtype and size

saveNpy
void saveNpy(string path, S x)

save mir.ndslice.Slice as numpy file format

Manifest constants

np2d
enum np2d;

numpy type string -> dlang type string conversion dictionary

Structs

NpyHeaderInfo
struct NpyHeaderInfo(size_t N)

NpyHeaderInfo

Templates

toDtype
template toDtype(D)

convert D type (not string) into numpy type string

Variables

npyfmt
auto npyfmt;
Undocumented in source.

Meta