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 missing parameters to the nan<x> functions #20027

Merged
merged 6 commits into from Oct 4, 2021
Merged

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Oct 4, 2021

Closes #20024

A number of the nan<x> functions previously lacked parameters that werepresent in their <x>-based counterpart,
e.g. the where parameter was present in np.mean but absent from np.nanmean.

This PR thus ports the following (previously missing) parameters to the nan<x> functions:

  • nanmin: initial & where
  • nanmax: initial & where
  • nanargmin: keepdims & out
  • nanargmax: keepdims & out
  • nansum: initial & where
  • nanprod: initial & where
  • nanmean: where
  • nanvar: where
  • nanstd: where

@BvB93 BvB93 added 01 - Enhancement component: numpy.lib 62 - Python API Changes or additions to the Python API. Mailing list should usually be notified. labels Oct 4, 2021
Bas van Beek added 6 commits October 4, 2021 19:04
Comment on lines +1147 to +1148
.. versionadded:: 1.22.0

Copy link
Member Author

Choose a reason for hiding this comment

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

Not directly related to this PR, but I noticed #19211 didn't add a versionadded directive.

@charris charris merged commit c231c33 into numpy:main Oct 4, 2021
@charris
Copy link
Member

charris commented Oct 4, 2021

Thanks Bas. I was a bit worried about the functions that used _divide_by_count, but they look good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - Enhancement 62 - Python API Changes or additions to the Python API. Mailing list should usually be notified. component: numpy.lib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Add missing parameters to the nan<x> functions
2 participants