nigsp.io.load_mat¶
- nigsp.io.load_mat(fname, shape=None)[source]¶
Read files in matlab format.
Assumes the existence of a matrix/vector in the mat file, rendered as a numpy.ndarray. If there is more than a matrix, the one with the largest size will be selected.
- Parameters:
- fname
str
oros.PathLike
Path to the mat file
- shape
None
, ‘square’, or ‘rectangle’},str
, optional Shape of matrix, if empty, skip check
- fname
- Returns:
- mtx
numpy.ndarray
Data matrix
- mtx
- Raises:
EOFError
If the mat file does not contain matrix or vectors.
ImportError
If pymatreader is not installed or can’t be read.
See also
Notes
Requires module pymatreader to work