Skip to content

ugly: add a hack to monkey-patch pint's ndim for speed #215

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

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

mikapfl
Copy link
Member

@mikapfl mikapfl commented Apr 9, 2024

Pull request

Please confirm that this pull request has done the following:

  • Tests added
  • Documentation added (where applicable)
  • Description in a .rst file in the directory changelog_unreleased added - remember to include a * to make it a bullet point

Description

monkey-patch the changes from hgrecco/pint#1959 into pint so that performance goes back to normal

@mikapfl mikapfl requested a review from JGuetschow April 9, 2024 11:40
@mikapfl
Copy link
Member Author

mikapfl commented Apr 9, 2024

@JGuetschow it is not pretty at all, but the performance of ndim is unbearable. Everything is so super slow. This is also the reason why reading and writing netcdf files is slow. Hopefully, this gets resolved in pint proper, then we can remove this hack again.

Copy link
Contributor

@JGuetschow JGuetschow left a comment

Choose a reason for hiding this comment

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

Nice

@mikapfl mikapfl merged commit 29d3dda into main Apr 9, 2024
@mikapfl mikapfl deleted the hack-ndim branch April 9, 2024 11:56
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.

2 participants