-
Notifications
You must be signed in to change notification settings - Fork 23
Move to numpy version 2 #846
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
Move to numpy version 2 #846
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments only.
I am happy overall so approving, though like with my latest (hopefully final) review on the cfdm numpy 2 PR there are a few warnings emerging when I add the np._set_promotion_state("weak_and_warn")
to the __init.py__
files and run the cf-python test suite to check for issues concerning the new type promotion behaviour, so we should check that they don't amount to anything or tweak if they do.
Looks to just be these three, though the warning emerges for any call so they spam STDOUT and I've just eyeballed quickly to try to spot anything else, something may be hiding amongst them. Note there is one warning each from a line/block in cf-python, cfdm and cfunits:
...
/home/slb93/git-repos/cfdm/cfdm/data/subarray/boundsfromnodessubarray.py:157: UserWarning: result dtype changed due to the removal of value-based promotion from NumPy. Changed from int32 to int64.
node_indices = node_indices - start_index
/home/slb93/git-repos/cf-python/cf/regrid/regrid.py:2189: UserWarning: result dtype changed due to the removal of value-based promotion from NumPy. Changed from int64 to int32.
node_ids += min_id + 1
/home/slb93/miniconda3/envs/cf-env-312-numpy2/lib/python3.12/site-packages/cfunits/units.py:2305: UserWarning: result dtype changed due to the removal of value-based promotion from NumPy. Changed from float64 to float128.
x -= offset
...
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Fixed the cf-python type casting: feb7404 |
Fixes #843
Needs NCAS-CMS/cfdm#323
Notes: