Check compatibility with scipy 1.11 sparse API
see https://docs.scipy.org/doc/scipy/release/1.11.0-notes.html#scipy-sparse-improvements
Specifically, our code should:
- Work with sparse arrays as well as sparse matrices
- If we need to create a sparse object, we should create sparse arrays if available.
Edited by Anton Akhmerov