Skip to content

Commit 5c70958

Browse files
committed
Debugging vis
1 parent f58cd3f commit 5c70958

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/dartsort/vis/gmm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,6 @@ def draw(self, panel, gmm, unit_id):
391391
else:
392392
log_liks = gmm.log_likelihoods(unit_ids=neighbors)
393393
labels, spikells, log_liks = gaussian_mixture.loglik_reassign(log_liks, has_noise_unit=True)
394-
log_liks = log_liks.tocoo()
395-
log_liks = gaussian_mixture.coo_to_torch(log_liks, torch.float)
396394
kept = labels >= 0
397395
labels_ = np.full_like(labels, -1)
398396
labels_[kept] = neighbors[labels[kept]].numpy(force=True)
@@ -420,7 +418,7 @@ def draw(self, panel, gmm, unit_id):
420418
if "in_pair_kept" not in bimod_info:
421419
scatter_ax.text(0, 0, f"too few spikes")
422420
else:
423-
c = glasbey1024[labels[bimod_info["in_pair_kept"]]]
421+
c = np.atleast_2d(glasbey1024[labels[bimod_info["in_pair_kept"]]])
424422
scatter_ax.scatter(bimod_info["xi"], bimod_info["xj"], s=3, lw=0, c=c)
425423
scatter_ax.set_ylabel(unit_id, color=glasbey1024[unit_id])
426424
scatter_ax.set_xlabel(other_id.item(), color=glasbey1024[other_id])

0 commit comments

Comments
 (0)