Skip to content

Add a new broadcasting mode that inserts size-1 dimensions. #10033

Open
@dcherian

Description

@dcherian

I've found it useful to broadcast to size-1 unlabeled dimensions. This allows you to avoid useless extra work in functions that accept unlabeled arrays, and would be very convenient when paired with apply_ufunc.

For example: https://github.com/xarray-contrib/flox/blob/ca576812e78b3978421eace6e9dde5a76729ebcc/flox/xarray.py#L45-L62

This should be paired with #2171

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