Closed kounelisagis closed 1 month ago
Following the official migration guide: https://numpy.org/devdocs/numpy_2_0_migration_guide.html
ruff
NPY201
pyproject.toml
Also:
setup.py
resource_filename()
np.get_include()
np.set_printoptions(legacy='1.21')
__repr__
>>> np.__version__ '2.0.0rc2' >>> np.int32(1) 'np.int32(1)'
>>> np.__version__ '1.26.4' >>> np.int32(1) '1'
This caused examples to fail: https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/fragment.py#L79.
Questions to discuss:
np.set_printoptions
[sc-46950]
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]