Skip to content
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

ENH: Add annotations for np.pad #19223

Merged
merged 2 commits into from
Jun 11, 2021
Merged

ENH: Add annotations for np.pad #19223

merged 2 commits into from
Jun 11, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Jun 11, 2021

Per the title: this PR adds annotations for the np.pad function, including some basic dtype support.

Comment on lines +85 to +86
mode: _ModeFunc,
**kwargs: Any,
Copy link
Member Author

Choose a reason for hiding this comment

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

Whichever **kwargs are valid depends on the passed callback in question.

Comment on lines +55 to +56
# TODO: In practice each keyword argument is exclusive to one or more
# specific modes. Consider adding more overloads to express this in the future.
Copy link
Member Author

@BvB93 BvB93 Jun 11, 2021

Choose a reason for hiding this comment

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

Personally I didn't feel it was worthwhile to add 3 * 2 additional overloads for linking specific keyword arguments to mode values.

@charris charris merged commit 341736a into numpy:main Jun 11, 2021
@charris
Copy link
Member

charris commented Jun 11, 2021

Thanks Bas.

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.

None yet

2 participants