phys2cvr.io.load_mat¶
- phys2cvr.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|os.PathLike Path to the
.matfile.- shape
None|'square'|'rectangle' Shape of matrix, if empty, skip check.
- fname
- Returns:
- mtx
numpy.ndarray Data matrix.
- mtx
- Raises:
EOFErrorIf the mat file does not contain matrix or vectors.
ImportErrorIf pymatreader is not installed or can’t be read.
See also
utils.check_array_dim
Notes
Requires module
pymatreaderto work.