From 94705a3813210cf5d4cf273d79588bd40f9f9ce5 Mon Sep 17 00:00:00 2001 From: Weatherbench authors Date: Wed, 25 Oct 2023 17:49:11 -0700 Subject: [PATCH] silence xarray pytype error in weatherbench2 PiperOrigin-RevId: 576698744 --- weatherbench2/derived_variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatherbench2/derived_variables.py b/weatherbench2/derived_variables.py index 7aa6bfd..8881db6 100644 --- a/weatherbench2/derived_variables.py +++ b/weatherbench2/derived_variables.py @@ -112,7 +112,7 @@ def _d_dx(field: xr.DataArray) -> xr.DataArray: cos_theta = np.cos(np.deg2rad(latitude)) # TODO(shoyer): use a custom calculation with roll() instead of # differentiate() to calculate rolling over 360 to 0 degrees properly. - return _zero_poles( + return _zero_poles( # pytype: disable=bad-return-type field.differentiate('longitude') / cos_theta / _METERS_PER_DEGREE )