bundles / scipy 1.18.0 / scipy / io / _mmio / MMFile / read
function
scipy.io._mmio:MMFile.read
source: /scipy/io/_mmio.py:569
Signature
def read(self, source, *, spmatrix = <object object at 0x0000>)Summary
Reads the contents of a Matrix Market file-like 'source' into a matrix.
Parameters
source: str or file-likeMatrix Market filename (extensions .mtx, .mtz.gz) or open file object.
spmatrix: bool, optional (default: True)If
True, return sparse matrix. Otherwise return sparse array.
Returns
a: ndarray or coo_array or coo_matrixDense or sparse array depending on the matrix format in the Matrix Market file.
Aliases
scipy.io._mmio.MMFile.read