scipy.sparse.bsr_matrix.getnnz
scipy.sparse.bsr_matrix.log1p
Returns a copy of row i of the matrix, as a (1 x n) sparse matrix (row vector).