-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Functions select
and where
don't preserve subclasses
#10933
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
Comments
Related: #8994 |
Longer answer: no, not really intended. See also an earlier report by myself, #5095 (part of what got me into trying to fix pieces of numpy, better be careful!) |
We looked into this at the MAN/AHL pydata hackathon, and for To make a long story short:
If |
@cournape - the ideal solution would indeed be to implement the 3-form version as a ufunc, since the the new override mechanism ( I'm a bit worried that we're now spreading discussion over many different issues, so I think I'll close this one. Please do add anything relevant to #8994. |
Hey there 👋 !
I'm using numpy
1.14.2
with python2.7.10
.I'm trying to subclass
numpy.ndarray
, and it seems like, unlike most other operators/functions,numpy.select
andnumpy.where
don't preserve the sublass of an array. Here is an exemple:Is that an intended behavior ?
Thanks a lot !
The text was updated successfully, but these errors were encountered: