Add a new broadcasting mode that inserts size-1 dimensions.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the flox example at xarray.py lines 45-62 and the related issue #2171 to understand the intended broadcasting behavior. Done means adding a broadcasting mode that inserts size-1 unlabeled dimensions and coordinating it with #2171.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100