-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
EHN: add nanmin/nanmax in scipy.sparse #8902
Conversation
Makes sense to have |
It was one of my concern as well. Would you make them accessible by |
For symmetry with numpy, that would be my preference I think. Since this is a new feature, it would be useful if you could mention this on the scipy-dev mailing list to see if others have opinions. |
OK
…On 9 June 2018 at 20:15, Ralf Gommers ***@***.***> wrote:
For symmetry with numpy, that would be my preference I think. Since this
is a new feature, it would be useful if you could mention this on the
scipy-dev mailing list to see if others have opinions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8902 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHG9P4v3LYNKs5Psl66raIAwTHdPGH8Cks5t7BCkgaJpZM4UZxgP>
.
--
Guillaume Lemaitre
INRIA Saclay - Parietal team
Center for Data Science Paris-Saclay
https://glemaitre.github.io/
|
The current nep for numpy |
If |
Even if one makes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a merge conflict that would need resolving.
@glemaitre this PR is looking close to mergeable, just a few minor issues to address. If you don't think you'll have time, let us know and someone else can take over (your existing commits will remain). |
@perimosocordiae Be aware that right now, |
I just opened gh-18542 which preserves these commits and resolves the merge conflict from scipy/sparse/data.py, so I'll close this PR now. |
* EHN: add nanmin/nanmax in scipy.sparse * DOC cross-referencing to other docstring * PEP8 * address comments * DOC update docstring * fix doc * Fix test failure * Apply suggestions from code review Co-authored-by: Julien Jerphanion <git@jjerphan.xyz> * Fix tests * Fix test error missed in the rebase --------- Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
NumPy allows for finding
np.min
andnp.max
by ignoring NaN values.Currently, there is no implementation in the
sparse
module whilenp.fmin
andnp.fmax
could be used similarly asnp.minimum
andnp.maximum
ufunc.Our use case is in scikit-learn: we have some pre-processing methods for which we would like to discard NaN to compute those extrema.