Skip to content

Commit 1265537

Browse files
committed
ready for checkout
1 parent 1818e92 commit 1265537

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

xcube_resampling/rectify.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def _downscale_source_dataset(
277277
interp_methods: SpatialInterpMethods | None,
278278
agg_methods: SpatialAggMethods | None,
279279
prevent_nan_propagations: PreventNaNPropagations,
280-
) -> (xr.Dataset, GridMapping):
280+
) -> tuple[xr.Dataset, GridMapping]:
281281
if interp_methods in [0, "nearest"]:
282282
return source_ds, source_gm
283283

@@ -294,9 +294,9 @@ def _downscale_source_dataset(
294294
(source_gm.xy_dim_names[1], source_gm.xy_dim_names[0]),
295295
downscaled_size,
296296
source_gm.tile_size,
297-
_prep_spatial_interp_methods_downscale(interp_methods),
298-
agg_methods,
299-
prevent_nan_propagations,
297+
interp_methods=_prep_spatial_interp_methods_downscale(interp_methods),
298+
agg_methods=agg_methods,
299+
prevent_nan_propagations=prevent_nan_propagations or True,
300300
)
301301
source_gm = GridMapping.from_dataset(source_ds)
302302

xcube_resampling/reproject.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def _downscale_source_dataset(
239239
interp_methods: SpatialInterpMethods | None,
240240
agg_methods: SpatialAggMethods | None,
241241
prevent_nan_propagations: PreventNaNPropagations,
242-
) -> (xr.Dataset, GridMapping):
242+
) -> tuple[xr.Dataset, GridMapping]:
243243
if interp_methods in [0, "nearest"]:
244244
return source_ds, source_gm
245245

@@ -269,7 +269,7 @@ def _downscale_source_dataset(
269269
source_gm=source_gm,
270270
interp_methods=_prep_spatial_interp_methods_downscale(interp_methods),
271271
agg_methods=agg_methods,
272-
prevent_nan_propagations=prevent_nan_propagations,
272+
prevent_nan_propagations=prevent_nan_propagations or True,
273273
)
274274
source_gm = GridMapping.from_dataset(source_ds)
275275

@@ -318,8 +318,8 @@ def _reproject_data_array(
318318
y_coords,
319319
dtype=tiled.dtype,
320320
chunks=(chunk, *source_yy.chunks),
321-
scr_x_res=source_gm.x_res,
322-
scr_y_res=source_gm.y_res,
321+
src_x_res=source_gm.x_res,
322+
src_y_res=source_gm.y_res,
323323
interp_method=interp_method,
324324
)
325325
)

0 commit comments

Comments
 (0)