-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
ENH: add ufuncs additional kwargs like out
, dtype
etc.. for np.where
(out
is needed most)
#18516
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
Largely duplicates #8994 I think |
Thank you for the reference, to find that the feature is still not implemented after four years. It looks that the obstacle lays in the initial imature design that merges two inrelevent things in one function. So, can we have a second best choice, i.e., if it is not easy to make |
I don't think this is really the obstacle - a bigger issues is that |
Well, I am working on that part (next big item on my agenda). Hopefully we have better support for "flexible" or "parametric" dtypes fairly soon. We actually do have some support, but its weird enough that either nobody knew we have it or nobody felt like using it. On the other hand, |
Thanks for the reply. Until today do I read the source code and know that the |
I found that there is already a ternary ufunc named |
If you don't mind overwriting one of the inputs, I think adding a ternary ufunc for this "meld" operation is fine (assuming its not insanely much churn). Adding it to the main namespace, I am not sure... There is a |
The purpose for When The name |
Feature
np.where
can be regarded as a ternary ufuncs composed ofcond?x:y
, so it is naturalfor
np.where
to have kwargs likeout
,dtype
etc. Supporting these kwargs can saveefforts for allocating memory, type casting, etc. In addtion, library
numexpr
does supportthis kind of syntax.
The text was updated successfully, but these errors were encountered: