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

masked array: The unit of the quantity is stripped. #688

Closed
jparal opened this issue Sep 1, 2018 · 3 comments
Closed

masked array: The unit of the quantity is stripped. #688

jparal opened this issue Sep 1, 2018 · 3 comments
Labels
duplicate numpy Numpy related bug/enhancement

Comments

@jparal
Copy link

jparal commented Sep 1, 2018

strange behavior for masked_array. i wonder if this is a bug?

import pint
import numpy as np
units = pint.UnitRegistry(autoconvert_offset_to_baseunit=False)
# OK
np.ma.masked_array(data=[1], mask=[False]) * units.cm
# UnitStrippedWarning: The unit of the quantity is stripped.
np.ma.masked_array(data=[1], mask=[False]) * units('cm')
@dopplershift
Copy link
Contributor

Duplicate of #633 I think.

@hgrecco hgrecco added the numpy Numpy related bug/enhancement label Dec 3, 2019
@hgrecco
Copy link
Owner

hgrecco commented Dec 3, 2019

Revisit after #905

@jthielen
Copy link
Contributor

jthielen commented Dec 30, 2019

This can be closed as a duplicate of #633 as @dopplershift mentioned? It wasn't fixed in #905, or the incoming downcast compatibility follow-up, and instead seems to be an upstream issue (numpy/numpy#15200).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate numpy Numpy related bug/enhancement
Projects
None yet
Development

No branches or pull requests

4 participants