If I do a np.shape over a Quantity, the operation mutates the type of the .magnitude
See the example below :
#pint.__version__ ('0.8')
#numpy.__version__ ('1.10.1')
import pint
import numpy as np
ureg = pint.UnitRegistry()
q = ureg.Quantity(1)
print type(q.magnitude) # <type 'int'>
np.shape(q) #Out[6]: ()
print type(q.magnitude) # <type 'numpy.ndarray'>
If I do a
np.shapeover a Quantity, the operation mutates the type of the.magnitudeSee the example below :