XLPack 7.0
Python API Reference Manual
Loading...
Searching...
No Matches

◆ mm_read_info()

def mm_read_info ( fname  )

Read matrix information from Matrix Market file

Purpose
This function reads format and size of matrix from the Matrix Market file.
Returns
(info, nrow, ncol, nnz, dtype, mshape, mform)

info (int):
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= 1: Failed to open file.
= 3: File read error.
= 4: Invalid type.

nrow (int):
Number of rows of the matrix.

ncol (int):
Number of columns of the matrix.

nnz (int):
Number of nonzero elements of the matrix.

dtype (int):
Data type of the matrix.
= 0: Real.
= 1: Complex
= 2: Pattern.
= 3: Integer.

mshape (int):
Matrix shape.
= 0: General.
= 1: Symmetric.
= 2: Skew-symmetric.
= 3: Hermitian.

mform (int):
Storage format of the matrix.
= 0: Sparse.
= 1: Dense.
Parameters
[in]FnameInput file name.