-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
ENH: Create a place for "optimization" ufuncs #18483
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
Some related issues:
|
One thing about which to put into NumPy proper and which not: I think a good starting point would be to argue that anything could go into an |
I wonder if we could grow a "fused loop" ability, where you would say np.fuse(max, min)(args, ...) which would
This is complicated for SIMD loops. |
Also am curious how other array libraries would extend or build on top of these. Though that is probably less important than the points already raised. |
@mattip, I agree. I was using gh-11622 as an "issue" gather those, but maybe we should make a second one. Fused ops, such as
|
We have quite a few issues that request things like
minmax
,sincos
or maybe gufuncs that "chain" very common operations, such asall_greater
.I do think there is merit in such functions but we are not likely to add them into the NumPy main namespace. (There was an old PR or branch by Julian I think where he added a bunch of similar ones such as multiply-4-numbers-and-add (which I guess is a SIMD intrinsic). (Seems I probably remembered this PR for linalg, where the initial version included a few fused ops)
I see two options for this:
np.lib.performance
, at least for a subset of this type of functions.There is little chance of adding a new functions such as this in the main namespace though, so this is to encourage anyone interesting in it to create a small additional package and then it will be easier to discuss about option 2. as well. That is my current angle on it.
The text was updated successfully, but these errors were encountered: