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

[Feature request] Add nanptp function #13198

Closed
Gabriel-p opened this issue Mar 27, 2019 · 6 comments
Closed

[Feature request] Add nanptp function #13198

Gabriel-p opened this issue Mar 27, 2019 · 6 comments
Labels
triaged Issue/PR that was discussed in a triage meeting

Comments

@Gabriel-p
Copy link
Contributor

There is a ptp function but it will fail when there are nan values in the array.

@yliapis
Copy link

yliapis commented Mar 29, 2019

Hi Gabriel, I will take a go at this over the weekend

@rgommers
Copy link
Member

Having this linked somewhere would be nice, but I think it's too niche to include in numpy. we only want nan* versions of the most commonly used functions, and ptp is not one of those.

@yliapis
Copy link

yliapis commented Mar 29, 2019

From looking at the existing nan* functions, it looks like most of the base functions have nan analogs. I agree that ptp is not the most commonly used function, but I use it quite a bit on signal processing problems, and it does feel like it is missing given the other functions in nanfunctions.py. I've finished implementing a basic version, I'll get it up on my account once it is cleaned up and tested.

@yliapis
Copy link

yliapis commented Mar 30, 2019

If we decide to move forward with this one, I just opened a PR with the function implementation and corresponding tests.
#13220

@rgommers rgommers added triaged Issue/PR that was discussed in a triage meeting and removed 54 - Needs decision labels Feb 12, 2020
@rgommers
Copy link
Member

We discussed this in the triage meeting. Most people were happy with rejecting this feature request. @charris abstained, @seberg said he could imagine a separate namespace.

The main rationale here is that we don't want more nan-functions in general; we have the most commonly used ones, and filling up the main namespace with more nan-functions isn't justified (there's a significant cost for adding anything to the namespace at this point.

In particular for this one: ptp is already niche, and was arguably a mistake to add to numpy. So nanptp isn't desired.

A separate package like bottleneck makes more sense for more nan-functions.

Thanks for suggesting this @Gabriel-p, and for the PR @yliapis

@Gabriel-p
Copy link
Contributor Author

Thank you for the detailed explanation @rgommers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue/PR that was discussed in a triage meeting
Projects
None yet
Development

No branches or pull requests

3 participants