-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
np.median drops units if the result is nan
#12165
Comments
At some level, this reflects a problem upstream: while generally the numpy code deals well with subclasses, it seems it does not for this particular case - which I clearly had not noticed, so
|
@nstarman - no, it is really a bit of a numpy bug, which we can work around in |
See numpy/numpy#19869 (review) for the upstream fix. We could fix it for existing numpy versions if need be. |
Would that be in |
I was thinking of a numpy-version dependent override of |
As reported by @larrybradley in #12146 (comment):
np.median
drops the unit onQuantity
input where the result isnan
:Note that it works fine on multi-dimensional output:
The text was updated successfully, but these errors were encountered: