Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 26, 2024
1 parent 73e8eaa commit b9c2638
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/spikeinterface/core/sortinganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def _save_or_select_or_merge(
from spikeinterface.core.sorting_tools import get_ids_after_merging

new_unit_ids = get_ids_after_merging(self.sorting, units_to_merge, new_unit_ids=unit_ids)

if self.has_recording():
recording = self._recording
elif self.has_temporary_recording():
Expand Down
6 changes: 4 additions & 2 deletions src/spikeinterface/postprocessing/template_similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def _merge_extension_data(
self, units_to_merge, new_unit_ids, new_sorting_analyzer, kept_indices=None, verbose=False, **job_kwargs
):
num_shifts = int(self.params["max_lag_ms"] * self.sorting_analyzer.sampling_frequency / 1000)
templates_array = get_dense_templates_array(new_sorting_analyzer, return_scaled=self.sorting_analyzer.return_scaled)
templates_array = get_dense_templates_array(
new_sorting_analyzer, return_scaled=self.sorting_analyzer.return_scaled
)
arr = self.data["similarity"]
sparsity = new_sorting_analyzer.sparsity
all_new_unit_ids = new_sorting_analyzer.unit_ids
Expand Down Expand Up @@ -213,7 +215,7 @@ def compute_similarity_with_templates_array(
distances[count, i, j] /= norm_i + norm_j
else:
distances[count, i, j] = sklearn.metrics.pairwise.pairwise_distances(src, tgt, metric="cosine")

distances[count, j, i] = distances[count, i, j]

if num_shifts != 0:
Expand Down

0 comments on commit b9c2638

Please sign in to comment.