Skip to content

Conversation

@dopplershift
Copy link
Member

Description Of Changes

Fixes inteprolate_1d to properly handle the necessary broadcasting, at least for the source location (levels). I chose not to deal with broadcasting all source data since I think it's far less common and would require needing to manually do a bunch of unit manipulation.

This also tries to improve broadcast_indices to be at lease a bit more clear what it's doing (and reduces its call complexity).

Checklist

Simplify call by taking just the desired shape rather than an array and
number of dimensions (which were always in lock step in all usages
anyway). Also rename args, add comments, and improve docs to help make
it clearer what we're doing in the future.
…2714)

While it worked for n-dimensional arrays, it didn't work with a set of
levels that have been manually broadcast (with size 1 dimensions).
@dopplershift dopplershift added Type: Bug Something is not working like it should Area: Calc Pertains to calculations labels Oct 11, 2022
@dopplershift dopplershift added this to the September 2022 milestone Oct 11, 2022
@dopplershift dopplershift requested a review from a team as a code owner October 11, 2022 20:54
@dopplershift dopplershift requested review from dcamron and removed request for a team October 11, 2022 20:54
@dcamron dcamron merged commit a5dfc30 into Unidata:main Oct 14, 2022
@dopplershift dopplershift deleted the interpolate-broadcasting branch October 14, 2022 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Calc Pertains to calculations Type: Bug Something is not working like it should

Projects

None yet

Development

Successfully merging this pull request may close these issues.

interpolate_1d not properly working on ND arrays

2 participants