read_npy
result = read_npy(path)
Input: path · Output: result
What it is
Reads a NumPy .npy file (format versions 1-3, little- or big-endian, C or Fortran order) without NumPy. path (string) is the file.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = read_npy(path) | path stringnot documented yet | result number, vector, matrix, bool, or string | Returns a number (0-d array), a vector (1-d) or a matrix (2-d); float16/32/64 and every int/uint width become numbers, bool becomes a number 0/1 (a bool for a 0-d array; so a bool vector written with write_npy comes back as a numeric 0/1 vector, not a bool vector), complex64/128 become complex values. An array of three or more dimensions is an error naming its shape. Object (pickled) arrays are refused -- nothing is ever unpickled -- as are string, datetime and structured dtypes; an int64/uint64 value above 2^53 is an error rather than a rounded number. *Added in v0.4.7* |
Examples
No documentation example calls this form yet. The File I/O chapter is where one belongs.