@@ -61,7 +61,7 @@ def select_spatial_slice_pixels(
6161 The selected DataArray slice.
6262
6363 Raises:
64- ValueError: If the window dimensions are not even or the slice extends beyond the data
64+ ValueError: If the window dimensions are not even or the slice extends beyond the data
6565 boundaries.
6666 """
6767 if (width_pixels % 2 ) != 0 :
@@ -170,17 +170,17 @@ def select_spatial_slice_pixels_multiple(
170170 "Multi-location window not available: "
171171 f"left_idx ({ left_idx } ), right_idx ({ right_idx } ), "
172172 f"bottom_idx ({ bottom_idx } ), top_idx ({ top_idx } ), "
173- f"data_width_pixels ({ data_width_pixels } ), data_height_pixels ({ data_height_pixels } )"
173+ f"data_width_pixels ({ data_width_pixels } ), data_height_pixels ({ data_height_pixels } )" ,
174174 )
175-
175+
176176 # Add buffer of 1 pixel if window is 2 pixels wide to ensure the central location is within the
177177 # returned slice
178178 x_buffer = 1 if width_pixels == 2 else 0
179179 y_buffer = 1 if height_pixels == 2 else 0
180180
181181 return da .isel (
182182 {
183- x_dim : slice (left_idx , right_idx + x_buffer ),
184- y_dim : slice (bottom_idx , top_idx + y_buffer )
185- }
183+ x_dim : slice (left_idx , right_idx + x_buffer ),
184+ y_dim : slice (bottom_idx , top_idx + y_buffer ),
185+ },
186186 )
0 commit comments