-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
xarray 2022.6.0 doesn't work well with numpy 1.20 #6818
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
Comments
Thanks for the report. It seems that in 1.20 they used a different approach. |
What changed in numpy such that only one version is incompatible with our new release? Seems quite odd to have something break for one version, then work again for the next version. |
It seems that in 1.20 they started introducing typing but Not really the fault of numpy, we are using a not-public interface. So either we do a version check for 1.20, or we create our own SupportsDType (I assume a Protocol?) |
Right okay, thanks for the explanation @headtr1ck .
If we are still using a non-public interface, then we can't guarantee that it won't break again in numpy version 1.22 etc. So if that's the case perhaps we should try to make a sustainable solution. Otherwise I think special-casing one version is okay. |
Thanks for the quick fix. Is there a plan to have a quick patch release (e.g., 2022.6.1)? |
I think the devs are still too busy to publish more releases. |
Yeah unfortunately there are still a number of unfixed regressions |
Bypass issue with `TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class` reported in pydata/xarray#6818.
* NEP29: Test PyGMT on NumPy 1.23 Bumps [numpy](https://github.com/numpy/numpy) from 1.22.4 to 1.23.2. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/v1.23.0/doc/changelog/1.23.0-changelog.rst) - [Commits](numpy/numpy@v1.22.4...v1.23.2) * Set minimum NumPy version to 1.21 for CI tests Bypass issue with `TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class` reported in pydata/xarray#6818.
I just hit this same bug with numpy 1.23.3. Installing xarray from github main branch fixed it. I think we really need to release soon (#7069). |
* NEP29: Test PyGMT on NumPy 1.23 Bumps [numpy](https://github.com/numpy/numpy) from 1.22.4 to 1.23.2. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/v1.23.0/doc/changelog/1.23.0-changelog.rst) - [Commits](numpy/numpy@v1.22.4...v1.23.2) * Set minimum NumPy version to 1.21 for CI tests Bypass issue with `TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class` reported in pydata/xarray#6818.
Uh oh!
There was an error while loading. Please reload this page.
What happened?
Fail to import xarray when xarray 2022.6.0 and numpy 1.20 are installed. It seems xarray 2022.6.0 is not compatible with numpy 1.20. I also tried numpy 1.19 and 1.21, they all work well with xarray 2022.6.0.
What did you expect to happen?
xarray 2022.6.0 should work well with numpy 1.20.
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
No response
Anything else we need to know?
No response
Environment
The text was updated successfully, but these errors were encountered: