Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy.linalg.pinv2 not available in scipy 1.9 #246

Closed
mmaelicke opened this issue Aug 4, 2022 · 3 comments · Fixed by #247
Closed

scipy.linalg.pinv2 not available in scipy 1.9 #246

mmaelicke opened this issue Aug 4, 2022 · 3 comments · Fixed by #247
Assignees
Labels
bug Something isn't working external problem
Milestone

Comments

@mmaelicke
Copy link
Member

Hey Sebastian,
I am running some docker containers with always the latest gstools version in it. Now, the import of gstools fails.
Here is the relevant part of the traceback:

File "/usr/local/lib/python3.10/site-packages/skgstat/interfaces/gstools.py", line 151, in skgstat_to_krige
    import gstools as gs
File "/usr/local/lib/python3.10/site-packages/gstools/__init__.py", line 129, in <module>
    from gstools import (
File "/usr/local/lib/python3.10/site-packages/gstools/field/__init__.py", line 33, in <module>
    from gstools.field.cond_srf import CondSRF
File "/usr/local/lib/python3.10/site-packages/gstools/field/cond_srf.py", line 17, in <module>
    from gstools.krige import Krige
File "/usr/local/lib/python3.10/site-packages/gstools/krige/__init__.py", line 20, in <module>
    from gstools.krige.base import Krige
File "/usr/local/lib/python3.10/site-packages/gstools/krige/base.py", line 38, in <module>
    P_INV = {"pinv": spl.pinv, "pinv2": spl.pinv2, "pinvh": spl.pinvh}

I could verify, that scipy==1.9.0 in fact has no scipy.linalg.pinv2 method, while scipy==1.8.0 imports it just fine. The whole practice was run in a Python 3.10 environment.
I solved the issue by installing scipy==1.8.0 first and then gstools. I am also not sure if the pinv2 got moved or removed and if therefore any action on gstools-side is necessary.

@mmaelicke
Copy link
Member Author

scipy/scipy#15737 - Seems like pinv2 should be deprecated and/or removed without a deprecation warning?

@LSchueler
Copy link
Member

Hi Mirko,
thanks for reporting this! It should be resolved with PR #247 .

@LSchueler LSchueler self-assigned this Aug 4, 2022
@MuellerSeb MuellerSeb added this to the v1.4 milestone Aug 9, 2022
@MuellerSeb MuellerSeb added bug Something isn't working external problem labels Aug 9, 2022
@MuellerSeb MuellerSeb linked a pull request Aug 9, 2022 that will close this issue
@MuellerSeb
Copy link
Member

Also see: GeoStat-Framework/PyKrige#236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external problem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants