Skip to content

Commit

Permalink
Merge pull request #2080 from yger/sc2_fixes
Browse files Browse the repository at this point in the history
Sc2 fixes
  • Loading branch information
samuelgarcia authored Oct 6, 2023
2 parents 03f0f08 + f56780d commit 8ba35b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/spikeinterface/sorters/internal/spyking_circus2.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def _run_from_folder(cls, sorter_output_folder, params, verbose):

## We get the labels for our peaks
mask = peak_labels > -1
sorting = NumpySorting.from_times_labels(selected_peaks["sample_index"][mask], peak_labels[mask], sampling_rate)
sorting = NumpySorting.from_times_labels(
selected_peaks["sample_index"][mask], peak_labels[mask].astype(int), sampling_rate
)
clustering_folder = sorter_output_folder / "clustering"
if clustering_folder.exists():
shutil.rmtree(clustering_folder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def plot_statistics(self, metric="cosine", annotations=True, detect_threshold=5)
template_real = template_real.reshape(template_real.size, 1).T

if metric == "cosine":
dist = sklearn.metrics.pairwise.cosine_similarity(template, template_real, metric).flatten().tolist()
dist = sklearn.metrics.pairwise.cosine_similarity(template, template_real).flatten().tolist()
else:
dist = sklearn.metrics.pairwise_distances(template, template_real, metric).flatten().tolist()
res += dist
Expand Down

0 comments on commit 8ba35b4

Please sign in to comment.