Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit support for interpolation functions #2271

Merged
merged 5 commits into from
Jan 21, 2022

Conversation

dopplershift
Copy link
Member

Description Of Changes

Add support for units throughout the inverse distance weighting and natural neighbor interpolation code. Also ensure that interpolate_to_grid returns values with the same units as input for all methods.

Checklist

This fixes a PyCharm warning and is more normal anyway.
Hoist validation and selection of interpolation method out of the loop.
Also make use of np.full() and compress down some steps a bit.
@dopplershift dopplershift requested a review from a team as a code owner December 21, 2021 00:36
@dopplershift dopplershift requested review from dcamron and removed request for a team December 21, 2021 00:36
@dopplershift dopplershift added Area: Calc Pertains to calculations Area: Units Pertains to unit information Type: Bug Something is not working like it should labels Dec 21, 2021
@dopplershift dopplershift added this to the 1.2.0 milestone Dec 21, 2021
@dopplershift dopplershift changed the title Interp units Unit support for interpolation functions Dec 21, 2021
@dopplershift dopplershift changed the title Unit support for interpolation functions Unit support for interpolation functions' Dec 21, 2021
@dopplershift dopplershift changed the title Unit support for interpolation functions' Unit support for interpolation functions Dec 21, 2021
Copy link
Member

@dcamron dcamron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, and very much appreciate the test enhancements here.

@dcamron dcamron merged commit 10fea45 into Unidata:main Jan 21, 2022
@dopplershift dopplershift deleted the interp-units branch January 21, 2022 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Calc Pertains to calculations Area: Units Pertains to unit information Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support units in inverse_distance_to_points
2 participants