Skip to content

ENH: Create a place for "optimization" ufuncs #18483

Open
@seberg

Description

@seberg

We have quite a few issues that request things like minmax, sincos or maybe gufuncs that "chain" very common operations, such as all_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:

  1. If anyone wants to create these functions, I think we can definitely add them into their own repository/project in the NumPy organization.
  2. It could make sense to have a 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions