Queries the contents of the Matrix Market file ‘filename’ to extract size and storage information.


source : file

Matrix Market filename (extension .mtx) or open file object


rows,cols : int

Number of matrix rows and columns

entries : int

Number of non-zero entries of a sparse matrix or rows*cols for a dense matrix

format : str

Either ‘coordinate’ or ‘array’.

field : str

Either ‘real’, ‘complex’, ‘pattern’, or ‘integer’.

symm : str

Either ‘general’, ‘symmetric’, ‘skew-symmetric’, or ‘hermitian’.

Previous topic

Next topic