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

Conflict with latest numpy version #79

Closed
lee1043 opened this issue Nov 7, 2024 · 0 comments · Fixed by #80
Closed

Conflict with latest numpy version #79

lee1043 opened this issue Nov 7, 2024 · 0 comments · Fixed by #80

Comments

@lee1043
Copy link
Collaborator

lee1043 commented Nov 7, 2024

The current version of the code has a conflict with newer version of numpy when it's version is >= 2.0 because np.product is deprecated.

A similar issue and its solution were discussed from eofs package, and we can do similar here.

Traceback (most recent call last):
  File "/Users/lee1043/mambaforge/envs/pmp_devel_20241106_xcdat0.7.3/bin/enso_driver.py", line 16, in <module>
    from EnsoMetrics.EnsoCollectionsLib import (
  File "/Users/lee1043/mambaforge/envs/pmp_devel_20241106_xcdat0.7.3/lib/python3.10/site-packages/EnsoMetrics/__init__.py", line 2, in <module>
    from .EnsoComputeMetricsLib import *
  File "/Users/lee1043/mambaforge/envs/pmp_devel_20241106_xcdat0.7.3/lib/python3.10/site-packages/EnsoMetrics/EnsoComputeMetricsLib.py", line 11, in <module>
    from .EnsoMetricsLib import BiasPrLatRmse, BiasPrLonRmse, BiasPrRmse, BiasSshLatRmse, BiasSshLonRmse, BiasSshRmse,\
  File "/Users/lee1043/mambaforge/envs/pmp_devel_20241106_xcdat0.7.3/lib/python3.10/site-packages/EnsoMetrics/EnsoMetricsLib.py", line 12, in <module>
    from .EnsoUvcdatToolsLib import ArrayListAx, ArrayToList, AverageMeridional, AverageZonal, BasinMask, CheckTime,\
  File "/Users/lee1043/mambaforge/envs/pmp_devel_20241106_xcdat0.7.3/lib/python3.10/site-packages/EnsoMetrics/EnsoUvcdatToolsLib.py", line 14, in <module>
    from numpy import product as NPproduct
ImportError: cannot import name 'product' from 'numpy' (/Users/lee1043/mambaforge/envs/pmp_devel_20241106_xcdat0.7.3/lib/python3.10/site-packages/numpy/__init__.py)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant