Commit 4a6830ff authored by Bas Nijholt's avatar Bas Nijholt Committed by Bas Nijholt
Browse files

Fix ImportError for scipy 1.8.0


Currently, it gives the following error message:
ImportError                               Traceback (most recent call last)
Input In [29], in <module>
----> 1 from scipy.sparse.linalg import linsolve

ImportError: cannot import name 'linsolve' from 'scipy.sparse.linalg' (/nfshome/basnijholt/mambaforge/envs/qms-lab-20220224-main/lib/python3.9/site-packages/scipy/sparse/linalg/

With this change, the following warning is emitted:
/tmp/scratch/basnijholt/ipykernel_59547/ DeprecationWarning: The module `scipy.sparse.linalg.dsolve.linsolve` is deprecated. All public names must be imported directly from the `scipy.sparse.linalg` namespace.
  from scipy.sparse.linalg.dsolve import linsolve

The following gives no warning:
from scipy.sparse.linalg._dsolve import linsolve

However, we should reconsider using private features.
parent 0e398ff4
Pipeline #96876 passed with stages
in 9 minutes and 41 seconds