xoa.core.num.coo_to_csr

Contents

xoa.core.num.coo_to_csr#

xoa.core.num.coo_to_csr(row_indices, col_indices, weights_data, n_rows, n_cols)[source]#

Convert COO sparse triplets to a CsrMatrix.

Parameters:
  • row_indices (array-like of int) – Row and column indices of non-zero entries (COO format).

  • col_indices (array-like of int) – Row and column indices of non-zero entries (COO format).

  • weights_data (array-like of float) – Non-zero values.

  • n_rows (int) – Matrix dimensions.

  • n_cols (int) – Matrix dimensions.

Returns:

CsrMatrix