{ } Raw JSON

bundles / scipy latest / scipy / io / _mmio / MMFile / read

function

scipy.io._mmio:MMFile.read

source: /scipy/io/_mmio.py :564

Signature

def   read ( self source * spmatrix = True )

Summary

Reads the contents of a Matrix Market file-like 'source' into a matrix.

Parameters

source : str or file-like

Matrix 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_matrix

Dense or sparse array depending on the matrix format in the Matrix Market file.

Aliases

  • scipy.io._mmio.MMFile.read