streamsight.utils.add_columns_to_csr_matrix
- streamsight.utils.add_columns_to_csr_matrix(matrix: csr_matrix, n: int = 1) csr_matrix
Add a column of zeros to a csr_matrix.
https://stackoverflow.com/questions/30691160/effectively-change-dimension-of-scipy-spare-csr-matrix
- Parameters:
matrix (csr_matrix) – Matrix to add a column of zeros to.
- Returns:
Matrix with a column of zeros added.
- Return type:
csr_matrix