REFACTOR: Add support for NumPy 2.0 #376
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @j-ittner,
There's a new major release planned for NumPy for the end of December (namely NumPy 2.0) and there's quite a number of changes in the public API.
I checked codebases of facet, sklearndf and pytools and the only change that needs to be reflected is
np.float_ -> np.float64
(it's a backward compatible update).One cosmetic change that could also be included is
np.int_ -> np.int64
: Explicit bit-size aliases are now recommended to avoid platform-dependent behavior. Also, the default integer changed on Windows asnp.int_
will point to C'sintptr_t
instead oflong
data type (only an actual change for Windows 64bit). But I don't think it could impact facet directly.