matrix
matrix
¶
Program input/output utilities.
MatrixFormat
¶
MatrixIO
¶
Bases: ABC
Abstract base class declaring interface of matrix input-output manager.
Source code in cssfinder/io/matrix.py
new
classmethod
¶
Create new instance of matrix loader for file format. When format is None, file format is deduced from file extension.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix_format |
MatrixFormat
|
Path to file containing matrix data. |
required |
Returns:
Type | Description |
---|---|
MatrixIO
|
Matrix loader. |
Source code in cssfinder/io/matrix.py
load
¶
Load matrix from file as numpy array.
Source code in cssfinder/io/matrix.py
dump
¶
dump(
data: npt.NDArray[
np.int64 | np.float64 | np.complex128
],
dest: str | Path | IO[bytes],
) -> None
Dump matrix to file from numpy array.
Source code in cssfinder/io/matrix.py
MatrixMarketIO
¶
Bases: MatrixIO
MatrixIO implementation for loading MatrixMarket exchange format files.