Skip to content

Commit

Permalink
fix: enforce strict monotonicity check in data loader
Browse files Browse the repository at this point in the history
  • Loading branch information
kmnhan committed Dec 19, 2024
1 parent c3ec040 commit 513554e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/erlab/io/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,10 @@ def _combine_multiple(
if (
len(coord_dict) > 1
and len(data_list) > 1
and all(is_monotonic(np.asarray(v)) for v in coord_dict.values())
and all(
is_monotonic(np.asarray(v), strict=True)
for v in coord_dict.values()
)
):
# We rename with process_keys after assigning coords and expanding dims.
# This is necessary to ensure that coordinate_attrs are preserved.
Expand Down

0 comments on commit 513554e

Please sign in to comment.