Skip to content

Fix: Replace deprecated np.bool with np.bool_ for NumPy 2.0 compatibi…#1

Merged
siiptuo merged 1 commit into
actris-cloudnet:mainfrom
longtsing:main
Nov 6, 2025
Merged

Fix: Replace deprecated np.bool with np.bool_ for NumPy 2.0 compatibi…#1
siiptuo merged 1 commit into
actris-cloudnet:mainfrom
longtsing:main

Conversation

@longtsing

Copy link
Copy Markdown
Contributor

…lity

Fix NumPy 2.0 compatibility: replace deprecated np.bool with np.bool_

Replace the deprecated np.bool alias with np.bool_ to ensure compatibility with NumPy 2.0+. The np.bool alias was deprecated in NumPy 1.20 and removed in NumPy 2.0.

Changes:

  • Line 66: Update type annotation from npt.NDArray[np.bool] to npt.NDArray[np.bool_]
  • Line 71: Update dtype comparison from np.bool to np.bool_

This fixes the AttributeError: module 'numpy' has no attribute 'bool' that occurred when importing the module with NumPy 2.0+.

…lity

Fix NumPy 2.0 compatibility: replace deprecated np.bool with np.bool_

Replace the deprecated `np.bool` alias with `np.bool_` to ensure
compatibility with NumPy 2.0+. The `np.bool` alias was deprecated in
NumPy 1.20 and removed in NumPy 2.0.

Changes:
- Line 66: Update type annotation from `npt.NDArray[np.bool]` to 
  `npt.NDArray[np.bool_]`
- Line 71: Update dtype comparison from `np.bool` to `np.bool_`

This fixes the AttributeError: module 'numpy' has no attribute 'bool'
that occurred when importing the module with NumPy 2.0+.
@siiptuo

siiptuo commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

@siiptuo siiptuo merged commit ba4c483 into actris-cloudnet:main Nov 6, 2025
12 checks passed
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