Skip to content

Fix mypy error for np.select#6374

Merged
y0z merged 1 commit intooptuna:masterfrom
not522:fix-mypy-error
Dec 9, 2025
Merged

Fix mypy error for np.select#6374
y0z merged 1 commit intooptuna:masterfrom
not522:fix-mypy-error

Conversation

@not522
Copy link
Copy Markdown
Member

@not522 not522 commented Dec 9, 2025

Motivation

Recent releases of numpy-typing-compat have begun installing numpy 2.4.0rc1, which causes mypy error. This PR rewrites np.select with explicit implementation.

Description of the changes

Rewriting np.select to fix mypy error.

@not522 not522 added the code-fix Change that does not change the behavior, such as code refactoring. label Dec 9, 2025
@not522 not522 assigned c-bata and y0z Dec 9, 2025
@not522
Copy link
Copy Markdown
Member Author

not522 commented Dec 9, 2025

@c-bata @y0z Could you review this PR?

Copy link
Copy Markdown
Member

@c-bata c-bata left a comment

Choose a reason for hiding this comment

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

LGTM.

@c-bata c-bata removed their assignment Dec 9, 2025
@c-bata c-bata added this to the v4.7.0 milestone Dec 9, 2025
Copy link
Copy Markdown
Member

@y0z y0z left a comment

Choose a reason for hiding this comment

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

LGTM

@y0z y0z removed their assignment Dec 9, 2025
@y0z y0z merged commit 68bafa6 into optuna:master Dec 9, 2025
14 checks passed
@not522 not522 deleted the fix-mypy-error branch December 9, 2025 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-fix Change that does not change the behavior, such as code refactoring.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants