Skip to content

Commit

Permalink
silence xarray pytype error in weatherbench2
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 576698744
  • Loading branch information
Weatherbench authors committed Oct 26, 2023
1 parent 338e411 commit 94705a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weatherbench2/derived_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down

0 comments on commit 94705a3

Please sign in to comment.