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.
Following the official migration guide: https://numpy.org/devdocs/numpy_2_0_migration_guide.html
ruff
version.NPY201
rule topyproject.toml
.Also:
setup.py
, instead of usingresource_filename()
, usenp.get_include()
which works both for numpy1 and numpy2 and is used by large projects: https://github.com/pandas-dev/pandas/blob/58461fef2315d228d08f65f8a9430e9294d65b31/setup.py#L559.np.set_printoptions(legacy='1.21')
(numpy-docs) because there are changes in__repr__
. As shown below:This caused examples to fail: https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/fragment.py#L79.
Questions to discuss:
np.set_printoptions
exist for specific cases? Right now it's for the whole package.[sc-46950]