Expand description
Matrix Market exchange files (SciPy’s io.mmread, io.mmwrite and io.mminfo).
A Matrix Market file is text: a banner %%MatrixMarket matrix <format> <field> <symmetry>,
comment lines starting with %, a size line, and the entries. The coordinate format lists
row column value triplets (1-based) of a sparse matrix; the array format lists every entry
of a dense matrix in column-major order. The field is real, integer, complex or
pattern (no values); the symmetry general, symmetric, skew-symmetric or hermitian,
in which case only the lower triangle is stored.
See the book entry Scientific data files.
Structs§
- Matrix
Market - A matrix read from (or to be written to) a Matrix Market file. The entries are always the
full matrix — symmetric files are expanded on reading, as SciPy’s
mmreaddoes — as 0-based triplets; values are complex so one type serves every field (the imaginary part is zero unless the field is complex, and the value is 1 for pattern files). - MmInfo
- The header information of a Matrix Market file (SciPy’s
mminfo).
Enums§
- MmField
- The type of the entries.
- MmFormat
- Sparse triplets or a dense array.
- MmSymmetry
- Which part of the matrix is stored.
Functions§
- mm_
decode - Parses a Matrix Market file (SciPy’s
mmread). Symmetric, skew-symmetric and Hermitian matrices are expanded to the full matrix: each stored off-diagonal entry(i, j, v)adds(j, i, v),(j, i, −v)or(j, i, v̄). - mm_
encode - Writes a Matrix Market file (SciPy’s
mmwrite): the coordinate or array format as declared, with only the lower triangle for a symmetric matrix (the strictly lower one for a skew-symmetric one). Values are written in the shortest form that reads back exactly. - mm_info
- The header of a Matrix Market file (SciPy’s
mminfo). - read_
mm_ file - Reads a Matrix Market file.
- write_
mm_ file - Writes a Matrix Market file.