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

◆ coo_csr()

def coo_csr ( ,
,
nnz  ,
val  ,
rowind  ,
colind  ,
base  ,
val2  ,
rowptr2  ,
colind2  ,
base2   
)

COO -> CSR

Purpose
This routine converts the sparse matrix in COO format to the sparse matrix in CSR format.

The order of elements in each row of output matrix will be same as input matrix.
Returns
info (int)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
Parameters
[in]mNumber of rows of the matrix. (m >= 0) (if m = 0, returns without computation)
[in]nNumber of columns of the matrix. (n >= 0) (if n = 0, returns without computation)
[in]nnzNumber of nonzero elements in the matrix.
[in]valNumpy ndarray (1-dimensional, float, nnz)
Values of nonzero elements of input matrix.
[in]rowindNumpy ndarray (1-dimensional, int32, nnz)
Row indices of input matrix.
[in]colindNumpy ndarray (1-dimensional, int32, nnz)
Column indices of input matrix.
[in]baseIndexing of rowind and colind.
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
[out]val2Numpy ndarray (1-dimensional, float, nnz)
Values of nonzero elements of output matrix.
[out]rowptr2Numpy ndarray (1-dimensional, int32, m + 1)
Row pointers of output matrix.
[out]colind2Numpy ndarray (1-dimensional, int32, nnz)
Column indices of output matrix.
[in]base2Indexing of colind2 and rowptr2.
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.