Test pynx with numpy 2.0
See https://numpy.org/devdocs/release/2.0.0-notes.html.
Some changes to be handled:
-
array(32-bit) + 64-bit float (e.g. a default python float) will return a 64-bit array. np._set_promotion_state("weak_and_warn")
should be used to track this -
asarray(copy=False)
orarray(..., copy=False)
will now return an exception if a copy is not made.
Main TODO:
-
use numpy<2.0 for the 2024.1 release (so this does not need to be done immediately) -
add a numpy>=2.0 test environment once 2024.1 is out. -
need to test both < and >= 2.0 for a little while afterwards..