Skip to content

Commit

Permalink
Chris' suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Sep 26, 2024
1 parent a5372b0 commit 211d68e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/spikeinterface/core/sortinganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import shutil
import warnings
import importlib
from copy import copy
from packaging.version import parse
from time import perf_counter

Expand Down Expand Up @@ -2023,10 +2024,7 @@ def copy(self, new_sorting_analyzer, unit_ids=None):
new_extension.data = self.data
else:
new_extension.data = self._select_extension_data(unit_ids)
if self.run_info is not None:
new_extension.run_info = self.run_info.copy()
else:
new_extension.run_info = None
new_extension.run_info = copy(self.run_info)
new_extension.save()
return new_extension

Expand All @@ -2044,10 +2042,7 @@ def merge(
new_extension.data = self._merge_extension_data(
merge_unit_groups, new_unit_ids, new_sorting_analyzer, keep_mask, verbose=verbose, **job_kwargs
)
if self.run_info is not None:
new_extension.run_info = self.run_info.copy()
else:
new_extension.run_info = None
new_extension.run_info = copy(self.run_info)
new_extension.save()
return new_extension

Expand Down

0 comments on commit 211d68e

Please sign in to comment.