-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
MNT mark non-standard inverse_transform X args as non-metadata (SLEP6) #26503
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
MNT mark non-standard inverse_transform X args as non-metadata (SLEP6) #26503
Conversation
|
I wouldn't mind having a consistent API for inverse_transform, deprecating |
|
@jeremiedbb done |
jeremiedbb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 2 deprecations will need |API| entries in the changelog. Otherwise I made a few suggestions but looks good overall
| if Xt is None and W is None: | ||
| raise TypeError("Missing required positional argument: Xt") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels a bit weird but I think it's fine since it's only during the deprecation cycle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I'm doing a TypeError here since python would do the same if user doesn't pass a positional arg.
jeremiedbb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
glemaitre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
scikit-learn#26503) Co-authored-by: jeremiedbb <[email protected]>
set_{method}_requestis generated for methods whenever they have arguments which are notX,y, orY. But forinverse_transformwe have a few places where we call the argument something else. This PR sets them explicitly asUNUSEDso that they're ignored by the metadata method generation mechanism andset_inverse_transform_requestmethod is not generated for them.I don't have a strong preference on adding
Xtand maybeyt/Ytto the hard coded list of ignored argument names.