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

Numpy 2.0 breaks processing #67

Closed
tngTUDOR opened this issue Jun 27, 2024 · 1 comment
Closed

Numpy 2.0 breaks processing #67

tngTUDOR opened this issue Jun 27, 2024 · 1 comment

Comments

@tngTUDOR
Copy link
Contributor

tngTUDOR commented Jun 27, 2024

When using numpy 2.0, this yields an error:

File ~/miniforge3/envs/LCA_WIND_DK/lib/python3.11/site-packages/bw_processing/utils.py:61, in dictionary_formatter(row)
     51 def dictionary_formatter(row: dict) -> tuple:
     52     """Format processed array row from dictionary input"""
     54     return (
     55         row["row"],
     56         # 1-d matrix
     57         row.get("col", row["row"]),
     58         row["amount"],
     59         as_uncertainty_type(row),
     60         row.get("loc", row["amount"]),
---> 61         row.get("scale", np.NaN),
     62         row.get("shape", np.NaN),
     63         row.get("minimum", np.NaN),
     64         row.get("maximum", np.NaN),
     65         row.get("negative", False),
     66         row.get("flip", False),
     67     )

Alias np.NaN has been removed. Use np.nan instead.
https://numpy.org/doc/stable/release/2.0.0-notes.html

@cmutel
Copy link
Member

cmutel commented Jul 2, 2024

Fixed in #68

@cmutel cmutel closed this as completed Jul 2, 2024
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

No branches or pull requests

2 participants