|
|
◆ csr_coo()
| def csr_coo |
( |
m |
, |
|
|
n |
, |
|
|
val |
, |
|
|
rowptr |
, |
|
|
colind |
, |
|
|
base |
, |
|
|
val2 |
, |
|
|
rowind2 |
, |
|
|
colind2 |
, |
|
|
base2 |
|
|
) |
| |
CSR -> COO
- Purpose
- This routine converts the sparse matrix in CSR format to the sparse matrix in COO format.
The order of elements of output matrix will be same as val array of input matrix. Arrys val and val2, and, colind and colind2 may be identical arrays.
- Returns
- info (int)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
- Parameters
-
| [in] | m | Number of rows of the matrix. (m >= 0) (if m = 0, returns without computation) |
| [in] | n | Number of columns of the matrix. (n >= 0) (if n = 0, returns without computation) |
| [in] | val | Numpy ndarray (1-dimensional, float, nnz)
Values of nonzero elements of input matrix (nnz is the number of nonzero elements of input matrix). |
| [in] | rowptr | Numpy ndarray (1-dimensional, int32, m + 1)
Row pointers of input matrix. |
| [in] | colind | Numpy ndarray (1-dimensional, int32, nnz)
Column indices of input matrix (nnz is the number of nonzero elements of input matrix). |
| [in] | base | Indexing of rowptr and colind.
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
| [out] | val2 | Numpy ndarray (1-dimensional, float, nnz)
Values of nonzero elements of output matrix (nnz is the number of nonzero elements of input matrix). |
| [out] | rowind2 | Numpy ndarray (1-dimensional, int32, nnz)
Row indices of output matrix (nnz is the number of nonzero elements of input matrix). |
| [out] | colind2 | Numpy ndarray (1-dimensional, int32, nnz)
Column indices of output matrix (nnz is the number of nonzero elements of input matrix). |
| [in] | base2 | Indexing of rowind2 and colind2.
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
|