diff --git a/cf/data/data.py b/cf/data/data.py index cf4b50c167..abf2d4567b 100644 --- a/cf/data/data.py +++ b/cf/data/data.py @@ -4407,7 +4407,9 @@ def arctan2(cls, x1, x2): x2: array_like X coordinates. *x1* and *x2* must be broadcastable to a common shape (which becomes the shape of the - output). + output). If both *x1* and *x2* have units, they must + be equal or equivalent, in which case they + will be conformed. :Returns: @@ -4434,6 +4436,9 @@ def arctan2(cls, x1, x2): [90.0 -90.0] """ + + x1 = conform_units(x1, x2.Units) + try: y = x1.to_dask_array() except AttributeError: