Skip to content

ENH: Dumpy, xarray or einx notation as an alternative to broadcasting #29527

@lverweijen

Description

@lverweijen

Proposed new feature or change:

On hacker news the following blog posts about NumPy have been trending a while ago:

It argues that while broadcasted notation has advantages over loops, it is not always obvious how it works on highly dimension arrays. It proposes an alternative api based on classic for-loops, which are still vectorised in the background. I was wondering if there is interest to incorporate something similar directly in numpy.

Alternatives:

  • Pytorch has already added named tensors, although this features is still experimental. Since pytorch was inspired by numpy, this idea can be incorporated back, especially if this feature proves to be valuable.
  • xarray builds on numpy and provides a similar datatype which has named dimensions.
  • einx fully embraces the notation used by einsum. Since this function is already part of numpy, there might already be a precedent to add other similar functions to numpy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions