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

◆ csr_trans()

def csr_trans ( ,
,
val  ,
ptr  ,
ind  ,
base  ,
val2  ,
ptr2  ,
ind2  ,
base2   
)

Transpose matrix (CSR)

Purpose
This routine computes the transpose of input matrix in CSR format.
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]valNumpy ndarray (1-dimensional, float, nnz)
Values of nonzero elements of input matrix (nnz is the number of nonzero elements of input matrix).
[in]ptrNumpy ndarray (1-dimensional, int32, n + 1 (if CSC) or m + 1 (if CSR))
Column pointers (if CSC) or row pointers (if CSR) of input matrix.
[in]indNumpy ndarray (1-dimensional, int32, nnz)
Row indices (if CSC) or column indices (if CSR) of input matrix.
[in]baseIndexing of ptr and ind.
= 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 (nnz is the number of nonzero elements of input matrix).
[out]ptr2Numpy ndarray (1-dimensional, int32, n + 1 (if CSC) or m + 1 (if CSR))
Column pointers (if CSC) or row pointers (if CSR) of output matrix.
[out]ind2Numpy ndarray (1-dimensional, int32, nnz)
Row indices (if CSC) or column indices (if CSR) of output matrix.
[in]base2Indexing of ptr2 and ind2.
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.