Loading [MathJax]/extensions/tex2jax.js
scipy 1.10.1 Pypi GitHub Homepage
Other Docs

ParametersReturns
mminfo(source)

Parameters

source : str or file-like

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

Returns

rows : int

Number of matrix rows.

cols : int

Number of matrix 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'.

symmetry : str

Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.

Return size and storage parameters from Matrix Market file-like 'source'.

Examples

from io import StringIO
from scipy.io import mminfo
text = '''%%MatrixMarket matrix coordinate real general
 5 5 7
 2 3 1.0
 3 4 2.0
 3 5 3.0
 4 1 4.0
 4 2 5.0
 4 3 6.0
 4 4 7.0
'''
``mminfo(source)`` returns the number of rows, number of columns, format, field type and symmetry attribute of the source file.
mminfo(StringIO(text))
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/io/_mmio.py#31
type: <class 'function'>
Commit: