Skip to content

Commit 834ac84

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 709f373 commit 834ac84

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/spikeinterface/extractors/phykilosortextractors.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,19 @@ def __init__(
229229
self.annotate(phy_folder=str(phy_folder.resolve()))
230230

231231
self.add_sorting_segment(PhySortingSegment(spike_times_clean, spike_clusters_clean))
232-
232+
233233
def _compute_and_cache_spike_vector(self) -> None:
234234
# make the spike_vector fast using the internal spike_times/spike_clusters
235235
# with a small mapping id to index
236236
# the order for 2 units with the same sample_index is not garanty here but should be OK
237-
237+
238238
unit_ids = self.unit_ids
239239

240240
# mapping unit_id to unit_index
241-
mapping = -np.ones(np.max(unit_ids) +1, dtype="int64")
241+
mapping = -np.ones(np.max(unit_ids) + 1, dtype="int64")
242242
for unit_ind, unit_id in enumerate(unit_ids):
243243
mapping[unit_id] = unit_ind
244-
244+
245245
spike_times = self.segments[0]._all_spike_times
246246
spike_clusters = self.segments[0]._all_clusters
247247
n = spike_times.size
@@ -265,7 +265,9 @@ def __init__(self, all_spike_times, all_clusters):
265265
def get_unit_spike_train(self, unit_id, start_frame, end_frame):
266266
start = 0 if start_frame is None else np.searchsorted(self._all_spike_times, start_frame, side="left")
267267
end = (
268-
len(self._all_spike_times) if end_frame is None else np.searchsorted(self._all_spike_times, end_frame, side="left")
268+
len(self._all_spike_times)
269+
if end_frame is None
270+
else np.searchsorted(self._all_spike_times, end_frame, side="left")
269271
) # Exclude end frame
270272

271273
spike_times = self._all_spike_times[start:end][self._all_clusters[start:end] == unit_id]

0 commit comments

Comments
 (0)