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.lib.function_base part 3/3 #20036

Merged
merged 2 commits into from
Oct 5, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Oct 5, 2021

Follow up on #20034

The last PR in a series for adding np.lib.function_base annotations.

Adds annotations for the following functions:

  • add_newdoc_ufunc
  • quantile
  • percentile
  • trapz
  • meshgrid
  • delete
  • insert
  • append
  • digitize

Comment on lines +632 to +634
# NOTE: Not an alias, but they do have identical signatures
# (that we can reuse)
quantile = percentile
Copy link
Member Author

Choose a reason for hiding this comment

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

A little bit of background:
Mypy defines functions exclusively according to their signatures,
so two functions with identical signatures are, as far as mypy is concerned, equivalent.

@charris charris merged commit b10a4de into numpy:main Oct 5, 2021
@charris
Copy link
Member

charris commented Oct 5, 2021

Thanks Bas. Note the percentile, quantile, and the nan versions are about to add a bunch new methods.

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