Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for numpy2 #1969

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

kounelisagis
Copy link
Member

@kounelisagis kounelisagis commented May 16, 2024

Following the official migration guide: https://numpy.org/devdocs/numpy_2_0_migration_guide.html

  • change to latest ruff version.
  • add the NPY201 rule to pyproject.toml.
  • replace removed members.

Also:

>>> 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:

  1. Should np.set_printoptions exist for specific cases? Right now it's for the whole package.
  2. Daily tests include numpy2. Locally the package is build as normal and all the tests successfully. Should numpy2 exist in CI?

[sc-46950]

@kounelisagis kounelisagis force-pushed the agis/sc-46950/add-support-for-numpy-2-0 branch from 75a9969 to 0b7084f Compare May 17, 2024 19:24
@kounelisagis kounelisagis requested review from nguyenv and ihnorton May 19, 2024 23:07
@kounelisagis kounelisagis marked this pull request as ready for review May 19, 2024 23:07
@kounelisagis kounelisagis merged commit caa9906 into dev May 20, 2024
34 checks passed
@kounelisagis kounelisagis deleted the agis/sc-46950/add-support-for-numpy-2-0 branch May 20, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants