Skip to content

Commit

Permalink
increase readability
Browse files Browse the repository at this point in the history
  • Loading branch information
JoranAngevaare committed Jun 26, 2024
1 parent 8b9ae86 commit d65a094
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,8 @@ def _lons_parsed_make_sense(
Since we know that the input-lons are all monotonically increasing, the parsed lons should also do that.
"""
accepted_differences_between_lon_coords = [np.array([1, np.nan]), np.ones(1)]
if len(
accepted_differences_between_lon_coords := np.unique(np.diff(input_lons))
) not in [1, 2]:
accepted_differences_between_lon_coords = np.unique(np.diff(input_lons))
if len(accepted_differences_between_lon_coords) not in [1, 2]:
raise RuntimeError(
f"Cannot work with changed format of inputdata {accepted_differences_between_lon_coords}"
)
Expand Down

0 comments on commit d65a094

Please sign in to comment.