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

avoid pint trouble with np.asarray #1210

Merged
merged 1 commit into from
Oct 17, 2019
Merged

avoid pint trouble with np.asarray #1210

merged 1 commit into from
Oct 17, 2019

Conversation

akrherz
Copy link
Contributor

@akrherz akrherz commented Oct 17, 2019

Description Of Changes

As mentioned in passing with #1209, pint.Quantity appears to have an issue when numpy.asarray is called with it as the argument. This change hopefully avoids the pint plumbing and allows direct usage of the magnitude, which is what the code wants to do anyway.

I also removed the no longer valid comment about operating on arrays without units.

Checklist

  • Fully documented

@zbruick zbruick added Area: Calc Pertains to calculations Type: Bug Something is not working like it should labels Oct 17, 2019
Copy link
Contributor

@zbruick zbruick left a comment

Choose a reason for hiding this comment

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

Looks fine given that no units are actually involved in these changes. Thanks for catching this bug!

@zbruick zbruick added this to the 0.11.1 milestone Oct 17, 2019
@zbruick zbruick merged commit 8c1ca0a into Unidata:master Oct 17, 2019
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.

2 participants