Is there a reason that the spatial and spectral extrema attributes store different data structures?
In [6]: cube.spectral_extrema
Out[6]: (<Quantity 340.0 km / s>, <Quantity 933.0 km / s>)
In [7]: cube.longitude_extrema
Out[7]: <Quantity [83.95, 84.00 ] deg>
I often want to perform arithmetic on these values and the tuple in particular doesn't lend itself doing this concisely.
In [8]: np.subtract(cubeA.spectral_extrema, cubeB.spectral_extrema)
...
UnitConversionError: 'Unit("km / s")' is not a scaled version of 'Unit(dimensionless)'
During handling of the above exception, another exception occurred:
...
TypeError: only dimensionless scalar quantities can be converted to Python scalars
Is there a reason that the spatial and spectral extrema attributes store different data structures?
I often want to perform arithmetic on these values and the tuple in particular doesn't lend itself doing this concisely.