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 2bba267 commit 28d0303Copy full SHA for 28d0303
src/nwbinspector/checks/_ecephys.py
@@ -181,16 +181,15 @@ def check_units_table_duration(
181
idxs = idxs[idxs != 0]
182
183
spike_times = units["spike_times"].target
184
+ if len(spike_times) == 0:
185
+ return None
186
if len(idxs) > 1:
187
start = np.min(np.r_[spike_times[0], spike_times[idxs[:-1]]])
188
else:
189
start = spike_times[0]
190
191
end = np.max(spike_times[idxs - 1])
192
- if len(spike_times) == 0:
- return None
193
-
194
start = float(np.min(spike_times))
195
end = float(np.max(spike_times))
196
duration = end - start
0 commit comments