Conversation
sadielbartholomew
left a comment
There was a problem hiding this comment.
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 <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
|
Fixed the cf-python type casting: feb7404 |
Fixes #843
Needs NCAS-CMS/cfdm#323
Notes: