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 np.nanprod #5418

Merged
merged 1 commit into from
Jan 5, 2015
Merged

ENH: add np.nanprod #5418

merged 1 commit into from
Jan 5, 2015

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Jan 3, 2015

This PR adds an implementation of nanprod.

The actual function is a two-liner adapted from nansum. Most of this PR
consists of documentation and tests (for which I took the opportunity to do
some consolidation).

A method with the same functionality exists in pandas, and I was surprised to
discover that it's not in numpy.


Notes
-----
Numpy integer arithmetic is modular. If the size of a sum exceeds the
Copy link
Member

Choose a reason for hiding this comment

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

sum -> product

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@charris
Copy link
Member

charris commented Jan 5, 2015

LGTM modulo noun nitpick.

This PR adds an implementation of `nanprod`.

The actual function is a two-liner adapted from `nansum`. Most of this PR
consists of documentation and tests (for which I took the opportunity to do
some consolidation).

A method with the same functionality exists in pandas, and I was surprised to
discover that it's not in numpy.
@charris
Copy link
Member

charris commented Jan 5, 2015

Merged, thanks.

charris added a commit that referenced this pull request Jan 5, 2015
@charris charris merged commit c6b8109 into numpy:master Jan 5, 2015
@shoyer shoyer mentioned this pull request Jun 23, 2015
@shoyer shoyer deleted the nanprod branch March 16, 2016 17:44
pwolfram added a commit to pwolfram/numpy that referenced this pull request Mar 24, 2016
This PR adds an implementation of `nancumsum` and `nancumprod`.

The actual function is a two-liner adapted from `nansum`.

Its structure is adapted from PR: numpy#5418
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants