We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdbfd39 commit 5cfea1aCopy full SHA for 5cfea1a
get_end_count.py
@@ -65,10 +65,13 @@ def group_end(end_d_f, offset=5):
65
66
# Iterate through pairs of numbers
67
for previous, current in zip(previous_sequence, current_sequence):
68
- if abs(previous - current) >= offset:
69
- # Large gap, we create a new empty sublist
70
- groups.append([])
71
- # Keep appending to the last sublist
+ try:
+ if abs(previous - current) >= offset:
+ # Large gap, we create a new empty sublist
+ groups.append([])
72
+ # Keep appending to the last sublist
73
+ except TypeError:
74
+ pass
75
groups[-1].append(current)
76
77
# print(groups)
0 commit comments