Skip to content

Commit e5e872e

Browse files
committed
black reformat
1 parent 52829b7 commit e5e872e

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

tests/test_binning.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,21 @@ def test_mean_binning_with_dict_index(test_datasets):
242242
# Create a custom binning index dictionary
243243
# This maps low-res grid points (i,j) to high-res grid point indices
244244
custom_index = {
245-
(0, 0): [(0, 0), (0, 1), (1, 0)], # Map low-res point (0,0) to 3 high-res points
246-
(1, 1): [(2, 2), (2, 3), (3, 2)], # Map low-res point (1,1) to 3 high-res points
247-
(2, 2): [(4, 4), (4, 5), (5, 4)], # Map low-res point (2,2) to 3 high-res points
245+
(0, 0): [
246+
(0, 0),
247+
(0, 1),
248+
(1, 0),
249+
], # Map low-res point (0,0) to 3 high-res points
250+
(1, 1): [
251+
(2, 2),
252+
(2, 3),
253+
(3, 2),
254+
], # Map low-res point (1,1) to 3 high-res points
255+
(2, 2): [
256+
(4, 4),
257+
(4, 5),
258+
(5, 4),
259+
], # Map low-res point (2,2) to 3 high-res points
248260
}
249261

250262
# Use the custom index directly
@@ -265,7 +277,9 @@ def test_mean_binning_with_dict_index(test_datasets):
265277
# Verify that the values are computed correctly as means
266278
# For example, point (0,0) should be the mean of high-res points (0,0), (0,1), (1,0)
267279
high_data = test_datasets["ds_high"]["sla"].values
268-
expected_value_00 = np.mean([high_data[0, 0, 0], high_data[0, 0, 1], high_data[0, 1, 0]])
280+
expected_value_00 = np.mean(
281+
[high_data[0, 0, 0], high_data[0, 0, 1], high_data[0, 1, 0]]
282+
)
269283
assert np.isclose(result.values[0, 0, 0], expected_value_00, rtol=1e-10)
270284

271285

0 commit comments

Comments
 (0)