Skip to content

Commit bd28a6a

Browse files
committed
Avoid making mypy unhappy
1 parent b5b15ab commit bd28a6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/xarray_regrid/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def format_lat(
311311
# TODO: with cos(90) = 0 weighting, these weights might be 0?
312312

313313
polar_lat = 90
314-
dy = obj.coords[lat_coord].diff(lat_coord).max().values.item()
314+
dy: Any = obj.coords[lat_coord].diff(lat_coord).max().values.item()
315315

316316
# Only pad if global but don't have edge values directly at poles
317317
# NOTE: could use xr.pad here instead of xr.concat, but none of the
@@ -369,8 +369,8 @@ def format_lon(
369369
# Only pad if domain is global in lon
370370
source_lon = obj.coords[lon_coord]
371371
target_lon = target.coords[lon_coord]
372-
dx_s = source_lon.diff(lon_coord).max().values.item()
373-
dx_t = target_lon.diff(lon_coord).max().values.item()
372+
dx_s: Any = source_lon.diff(lon_coord).max().values.item()
373+
dx_t: Any = target_lon.diff(lon_coord).max().values.item()
374374
is_global_lon = source_lon.max().values - source_lon.min().values >= 360 - dx_s
375375

376376
if is_global_lon:

0 commit comments

Comments
 (0)