I have been looking into alternative sparse encoding methods and reading through the CSR implementation. I noticed that a subset of complex slicing, in particular when the row is an array and the column is a slice with step > 1, can raise ValueError with bad shapes whereas the equivalent dense array slice completes successfully.
I’ve filed BUG: `csr_matrix` and `csr_array` have unexpected complex slicing behavior · Issue #25588 · scipy/scipy · GitHub with a proposed fix in BUG: `csr_matrix` and `csr_array` have unexpected fancy indexing behavior by cmclean · Pull Request #25589 · scipy/scipy · GitHub.