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

Properly handle offset units for trapz #1594

Merged
merged 3 commits into from Apr 29, 2023

Conversation

dopplershift
Copy link
Contributor

@dopplershift dopplershift commented Sep 30, 2022

I made an attempt to fix #1593. Fixing it is made complicated since the general multiplication handling in numpy_func.py is used for e.g. a = 5 * units.degC. The easiest way to fix it seemed then to be to just directly implement a wrapper for trapz. If this approach is acceptable, then I can also implement fixes for cross and dot.

  • Closes trapz incorrectly handling temperature #1593
  • Executed pre-commit run --all-files with no errors
  • The change is fully covered by automated unit tests
  • Documented in docs/ as appropriate
  • Added an entry to the CHANGES file

@dopplershift
Copy link
Contributor Author

dopplershift commented Apr 26, 2023

@hgrecco Are you ok with the general approach?

@hgrecco
Copy link
Owner

hgrecco commented Apr 26, 2023

@dopplershift I do!

@dopplershift
Copy link
Contributor Author

Ok, I can fix up and implement cross and dot.

@hgrecco
Copy link
Owner

hgrecco commented Apr 26, 2023

Do it in the same PR!

@hgrecco hgrecco added this to the 0.21 milestone Apr 26, 2023
@dopplershift
Copy link
Contributor Author

The test failures look unrelated to my changes. Those tests fail for me locally on the master branch as well.

@hgrecco
Copy link
Owner

hgrecco commented Apr 28, 2023

Indeed, this is related to #1505 I will fix it and then review and merge this.

@hgrecco hgrecco merged commit 87fb9d7 into hgrecco:master Apr 29, 2023
4 of 43 checks passed
@dopplershift dopplershift deleted the fix-trapz-temp branch May 3, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trapz incorrectly handling temperature
2 participants