Procs
proc read_npy[T: SomeNumber](npyPath: string): Tensor[T] {.noinit.}
-
Reads a .npy file and returns a Tensor of the specified type. If the ndarray is stored in a different type inside the file, it will be converted.
Input:
- The path to a numpy file as string
Output:
- A tensor
Only integer, unsigned integer and float ndarrays are supported at the moment.
Source Edit