Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Windspharm module incompatible with analysis3 environment #85

Open
weathermanbarnes opened this issue Aug 27, 2024 · 5 comments
Open

Windspharm module incompatible with analysis3 environment #85

weathermanbarnes opened this issue Aug 27, 2024 · 5 comments

Comments

@weathermanbarnes
Copy link

weathermanbarnes commented Aug 27, 2024

I have come across the following error on the conda analysis3 environment while using the tool “windspharm” which is installed in the analysis3 conda environment:

File “/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.04/lib/python3.10/site-packages/windspharm/xarray.py”, line 101, in init
u = to3d(u.values)
File “/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.04/lib/python3.10/site-packages/windspharm/_common.py”, line 119, in to3d
new_shape = array.shape[:2] + (np.prod(array.shape[2:], dtype=np.int),)
File “/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.04/lib/python3.10/site-packages/numpy/init.py”, line 324, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module ‘numpy’ has no attribute ‘int’.
[np.int](http://np.int/) was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing [np.int](http://np.int/), you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: ‘inf’?

It appears as if numpy have changed the way they read in "ints" which windspharm has not yet changed. I have changed to using analysis3-24.01 and all appears good there so must be a pretty recent thing. Could you pease assist?

@weathermanbarnes
Copy link
Author

weathermanbarnes commented Aug 27, 2024

Also: is the above a bot??? It appears so.......

@coecms coecms deleted a comment Aug 27, 2024
@coecms coecms deleted a comment from amir1387aht Aug 27, 2024
@coecms coecms deleted a comment Aug 27, 2024
@coecms coecms deleted a comment Aug 27, 2024
@paolap
Copy link
Member

paolap commented Aug 27, 2024

looks like it! hopefully this will stop it

@rbeucher
Copy link

rbeucher commented Nov 20, 2024

Hi @weathermanbarnes,

I noticed that the latest version of windspharm is over six years old. Given its age, it's likely that several dependencies—beyond just numpy—might cause compatibility issues with the "analysis3" environment.

If someone has the capacity to submit a pull request to update and fix Windspharm, it might be possible to include it in the latest version of the "analysis3" environment. However, as it stands, it seems more practical to remove the package from the environment and I would personally recommend that users set up their own conda environment if they wish to use it.

@weathermanbarnes
Copy link
Author

@rbeucher - windspharm has been fixed in the last few days and it has recently been updated in pip and conda-forge. So reinstalling the package in the analysis3 env should now fix the issue
https://ajdawson.github.io/windspharm/

@paolap
Copy link
Member

paolap commented Nov 20, 2024

We updated unstable for other reasons just last night and it looks like the new version of windspharm was identified and installed then

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@rbeucher @paolap @weathermanbarnes and others