-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
For Longitude and Latitude, the intent is that any arithmetic operation drops them back to Angle, since, e.g., the standard deviation of a longitude is not a longitude anymore (with wrapping making little sense). But:
from astropy.coordinates import Longitude
import numpy as np
l = Longitude(np.arange(10.), 'deg')
l.std()
# <Longitude 2.87228132 deg>
The method -> _wrap_function -> _result_as_quantity -> _new_view path bypasses _no_angle_subclass in __array_ufunc__. It will need some careful thought about how to proceed.
(Found by @astrofrog while trying to implement SpectralQuantity.)
Reactions are currently unavailable