Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure index of sparse matrices is always stored as NumPy arrays.
Previously, they could also be stored as plain lists, which would happen whenever the COOMatrix objects was initialised with lists. Most operations still worked ok then, but equality check means something completely different for NumPy arrays, and ProductSpaceOperator's __getitem__ method relies on this behaviour to look up the desired linear index for a requested element in the matrix of operators. If the index is a list, this would give wrong results.
- Loading branch information