Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix: Replace np.bool_ with np_bool in _ranking.py #31612

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MauryaGhogare
Copy link

This PR replaces deprecated np.bool_ with the compatible internal alias np_bool in _ranking.py.

  • Fixes linting issues flagged by Ruff (I001, F401)
  • Fixes mypy error: Module "sklearn.utils._array_api" has no attribute "bool"

This is part of scikit-learn's ongoing cleanup for NumPy compatibility.

Copy link

github-actions bot commented Jun 20, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: cd16843. Link to the linter CI: here

@MauryaGhogare
Copy link
Author

Hi! This PR replaces deprecated np.bool_ with np_bool in _ranking.py to align with NumPy 1.24+ compatibility. All lint and mypy errors are fixed. Looking forward to your review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant