Skip to content

Replace torch.newaxis with None for old PyTorch - #6237

Merged
nabenabe0928 merged 2 commits into
optuna:masterfrom
nabenabe0928:bug-fix/replace-torch-newaxis-with-none
Aug 6, 2025
Merged

nabenabe0928 merged 2 commits into
optuna:masterfrom
nabenabe0928:bug-fix/replace-torch-newaxis-with-none

Conversation

@nabenabe0928

Copy link
Copy Markdown
Contributor

Motivation

Since torch.newaxis is supported only after torch>=2.4.0, I will replace torch.newaxis with None.

Description of the changes

  • Replace torch.newaxis with `None

@nabenabe0928 nabenabe0928 added the bug Issue/PR about behavior that is broken. Not for typos/examples/CI/test but for Optuna itself. label Aug 6, 2025
@nabenabe0928 nabenabe0928 added this to the v4.5.0 milestone Aug 6, 2025
@nabenabe0928 nabenabe0928 added code-fix Change that does not change the behavior, such as code refactoring. and removed bug Issue/PR about behavior that is broken. Not for typos/examples/CI/test but for Optuna itself. labels Aug 6, 2025

@y0z y0z left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@nabenabe0928
nabenabe0928 merged commit bbb015f into optuna:master Aug 6, 2025
@nabenabe0928
nabenabe0928 deleted the bug-fix/replace-torch-newaxis-with-none branch May 14, 2026 03:49
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