Skip to content

Commit c877332

Browse files
committed
fixed bug if there are no times for a particular tile
1 parent cc99eca commit c877332

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/binTimes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
# make array of universal times: i.e. bins in which you will test binding
8181
# default time delta is the minimum time delta within a single tile
8282
if args.timeDelta is None:
83-
min_time_delta = np.min([(np.array(times[1:]) - np.array(times[:-1])).min()
84-
for times in timeDelta.values()])
83+
min_time_delta = np.min([(np.sort(times[1:]) - np.sort(times[:-1])).min()
84+
for times in timeDelta.values() if len(times) > 0])
8585
else:
8686
min_time_delta = args.timeDelta
8787

0 commit comments

Comments
 (0)