bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / io / _mmio / MMFile / read
function
scipy.io._mmio:MMFile.read
source: build-install/usr/lib/python3.14/site-packages/scipy/io/_mmio.py:573
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... deprecated:: 2.0.0The value True for
spmatrixwill no longer be supported in v2.2. The spmatrix classes are deprecated and will be removed then.
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