pymor.tools.io.matrices

Module Contents

Functions

_loadmat

_savemat

_mmread

_mmwrite

_load

_save

_savez

_loadtxt

_savetxt

_get_file_extension

load_matrix

Load matrix from file.

save_matrix

Save matrix to file.

pymor.tools.io.matrices._loadmat(path, key=None)[source]
pymor.tools.io.matrices._savemat(path, matrix, key=None)[source]
pymor.tools.io.matrices._mmread(path, key=None)[source]
pymor.tools.io.matrices._mmwrite(path, matrix, key=None)[source]
pymor.tools.io.matrices._load(path, key=None)[source]
pymor.tools.io.matrices._save(path, matrix, key=None)[source]
pymor.tools.io.matrices._savez(path, matrix, key=None)[source]
pymor.tools.io.matrices._loadtxt(path, key=None)[source]
pymor.tools.io.matrices._savetxt(path, matrix, key=None)[source]
pymor.tools.io.matrices._get_file_extension(path)[source]
pymor.tools.io.matrices.load_matrix(path, key=None)[source]

Load matrix from file.

Parameters

path

Path to the file (str or pathlib.Path).

key

Key of the matrix (only for NPY, NPZ, and MATLAB files).

Returns

matrix

NumPy array of SciPy spmatrix.

Raises

IOError

If loading fails.

pymor.tools.io.matrices.save_matrix(path, matrix, key=None)[source]

Save matrix to file.

Parameters

path

Path to the file (str or pathlib.Path).

matrix

Matrix to save.

key

Key of the matrix (only for NPY, NPZ, and MATLAB files).

Raises

IOError

If saving fails.