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

Skip to content

Conversation

@MauryaGhogare
Copy link
Contributor

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.

@github-actions
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
Contributor 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!

Copy link
Member

@StefanieSenger StefanieSenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MauryaGhogare,
thanks for your efforts. I’m not sure this change is necessary since numpy 1.24 is already quite old (our minimum supported version is 1.22), and we would have seen deprecation warnings if action was needed.

Also this fix causes some tests to fail instead of pass. Given that, I suggest we close this PR for now.

@lucyleeow lucyleeow added the spam spam PR and issues label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:metrics spam spam PR and issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants