Maybe you have already tested it and it isn't any faster, but you could vectorize, e.g. the `min` operation for all rows in a CSR matrix, by doing something along the lines of `np.minimum.reduceat(mat.data, mat.indptr[::-1])`, rather than looping over the slices.