Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Aug 8, 2024
1 parent 91c4ee8 commit 9eb4583
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions strax/processing/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def _overload_endtime(x):
@numba.jit(nopython=True, nogil=True, cache=True)
def diff(data):
"""Return time differences between items in data."""
if len(data) == 0:
return np.zeros(0, dtype=data.dtype["time"])
results = np.zeros(len(data) - 1, dtype=data.dtype["time"])
max_endtime = strax.endtime(data[0])
for i, (time, endtime) in enumerate(zip(data["time"][1:], strax.endtime(data)[:-1])):
Expand Down

0 comments on commit 9eb4583

Please sign in to comment.