Skip to content

Commit

Permalink
add nelems to check fun
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandratrapani committed Aug 8, 2024
1 parent ffb8217 commit 28acc06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nwbinspector/checks/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def check_timestamps_ascending(time_series: TimeSeries, nelems=200):


@register_check(importance=Importance.BEST_PRACTICE_VIOLATION, neurodata_type=TimeSeries)
def check_timestamps_with_nans(time_series: TimeSeries):
def check_timestamps_with_nans(time_series: TimeSeries, nelems=200):
"""Check if there are NaN values in the timestamps array."""
if time_series.timestamps is not None and np.isnan(time_series.timestamps).any():
if time_series.timestamps is not None and np.isnan(time_series.timestamps[:nelems]).any():
return InspectorMessage(message=f"{time_series.name} timestamps contain NaN values.")


Expand Down

0 comments on commit 28acc06

Please sign in to comment.