read_npy#
Read an NPY file into a tensor
Note
This function requires the optional MATX_ENABLE_FILEIO
compile flag
-
template<typename TensorType>
void matx::io::read_npy(TensorType &t, const std::string &fname)# Read a NPY file into a tensor view.
NPY files are a simple binary format for storing arrays of numbers.
- Template Parameters:
TensorType – Data type of tensor
- Parameters:
t – Tensor to read data into
fname – File name of .npy file
Examples#
io::read_npy(t, "../test/00_io/test.npy");