Skip to content

Fix test failures with NumPy 2 #329

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

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Fix test failures with NumPy 2 #329

merged 1 commit into from
Jun 24, 2024

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Jun 16, 2024

  • Replace deprecated np.alltrue() with np.all() (available since NumPy 1.7.0).

  • Cast NumPy boolean to bool(), to ensure doctests pass both with NumPy 2 (using np.True_) and NumPy 1 (using plain True).

Fixes #327

* Replace deprecated `np.alltrue()` with `np.all()` (available since
  NumPy 1.7.0).

* Cast NumPy boolean to `bool()`, to ensure doctests pass both with
  NumPy 2 (using `np.True_`) and NumPy 1 (using plain `True`).

Fixes Blosc#327
@FrancescAlted
Copy link
Member

Apparently, there are still issues with the Mac platform.

@mgorny
Copy link
Contributor Author

mgorny commented Jun 18, 2024

Apparently, there are still issues with the Mac platform.

My educated guess would be that cpu_info does not have a flags key there.

@FrancescAlted FrancescAlted merged commit 3eb4a90 into Blosc:main Jun 24, 2024
4 of 16 checks passed
@FrancescAlted
Copy link
Member

LGTM

@FrancescAlted
Copy link
Member

Thanks @mgorny !

@mgorny mgorny deleted the numpy2 branch June 24, 2024 17:31
@mgorny
Copy link
Contributor Author

mgorny commented Jun 24, 2024

Thanks!

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.

Numpy 2 compatibility
2 participants