8000 [ENH] nan_to_num enhancement to fill inexact values with user provided values · Issue #9356 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

[ENH] nan_to_num enhancement to fill inexact values with user provided values #9356

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

Closed
kikocorreoso opened this issue Jul 3, 2017 · 2 comments

Comments

@kikocorreoso
Copy link
Contributor
kikocorreoso commented Jul 3, 2017

[See PR #9355]

@eric-wieser
Copy link
Member
eric-wieser commented Jul 3, 2017

Note that you can already write this as a single expression with:

np.select([np.isnan(x), np.isposinf(x), np.isneginf(x)], [-999, 999, -999], x)

So I'd be inclined not to add yet another way to do it

@eric-wieser
Copy link
Member
eric-wieser commented Jul 3, 2017

Closing - let's leave the discussion at the PR (duplicate of #9355) - there's no need to open an issue here as well. I've copied the content across

@eric-wieser eric-wieser marked this as a duplicate of #9355 Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0