Skip to content

Commit 0681d24

Browse files
author
Jacob Pennington
committed
Fixed nearby_empty_chans check in clustering_qr.run
1 parent 79a2e8b commit 0681d24

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kilosort/clustering_qr.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ def run(ops, st, tF, mode='template', device=torch.device('cuda'),
482482
if device == torch.device('cuda'):
483483
torch.cuda.reset_peak_memory_stats(device)
484484
v = True
485-
486485
if Xd.shape[0] < 1000:
487486
iclust = torch.zeros((Xd.shape[0],))
488487
else:
@@ -542,7 +541,7 @@ def run(ops, st, tF, mode='template', device=torch.device('cuda'),
542541
pass
543542
raise
544543

545-
if nearby_chans_empty == len(ycent):
544+
if nearby_chans_empty == total_centers:
546545
raise ValueError(
547546
f'`get_data_cpu` never found suitable channels in `clustering_qr.run`.'
548547
f'\ndmin, dminx, and xcenter are: {dmin, dminx, xcup.mean()}'

0 commit comments

Comments
 (0)