Skip to content

Commit

Permalink
fix: is_monotonic_increasing replaces is_monotonic
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Jul 1, 2024
1 parent f189ca5 commit 76ae1de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/check_timesteps.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
data_frame = Batch.from_path(path).to_data_frame()
min = data_frame.datetime.min()
max = data_frame.datetime.max()
is_monotonic = data_frame.datetime.is_monotonic
if not is_monotonic:
is_monotonic_increasing = data_frame.datetime.is_monotonic_increasing
if not is_monotonic_increasing:
all_monotonic = False
bad_paths.append(path)
tqdm.tqdm.write(f"{path}: min={min}, max={max}, is_monotonic={is_monotonic}")
tqdm.tqdm.write(
f"{path}: min={min}, max={max}, is_monotonic_increasing={is_monotonic_increasing}"
)

if all_monotonic:
print("All files have monotonically increasing timestamps!")
Expand Down

0 comments on commit 76ae1de

Please sign in to comment.