streamsight.utils.add_rows_to_csr_matrix
- streamsight.utils.add_rows_to_csr_matrix(matrix: csr_matrix, n: int = 1) csr_matrix
Add a row of zeros to a csr_matrix.
ref: https://stackoverflow.com/questions/52299420/scipy-csr-matrix-understand-indptr
- Parameters:
matrix (csr_matrix) – Matrix to add a row of zeros to.
- Returns:
Matrix with a row of zeros added.
- Return type:
csr_matrix