diff --git a/elephant/spike_train_synchrony.py b/elephant/spike_train_synchrony.py index bf6e181e6..8eefc03da 100644 --- a/elephant/spike_train_synchrony.py +++ b/elephant/spike_train_synchrony.py @@ -356,11 +356,7 @@ def delete_synchrofacts(self, threshold, in_place=False, mode='delete'): # replace link to spiketrain in segment new_index = self._get_spiketrain_index( segment.spiketrains, st) - # Todo: Simplify following lines once Neo SpikeTrainList - # implments indexed assignment of entries (i.e., stl[i]=st) - spiketrainlist = list(segment.spiketrains) - spiketrainlist[new_index] = new_st - segment.spiketrains = spiketrainlist + segment.spiketrains[new_index] = new_st except ValueError: # st is not in this segment even though it points to it warnings.warn(f"The SpikeTrain at index {idx} of the " diff --git a/elephant/test/test_neo_tools.py b/elephant/test/test_neo_tools.py index 90e22176c..8bb88a141 100644 --- a/elephant/test/test_neo_tools.py +++ b/elephant/test/test_neo_tools.py @@ -1167,10 +1167,6 @@ def test__get_all_spiketrains__segment(self): supported_objects=[neo.core.Segment, neo.core.SpikeTrain]) targ = copy.deepcopy(obj) obj.spiketrains.append(obj.spiketrains[0]) - # TODO: The following is the original line of the test, however, this - # fails with Neo 0.10.0 - # Reinstate once issue is fixed - # obj.spiketrains.extend(obj.spiketrains) res0 = nt.get_all_spiketrains(obj) @@ -1320,7 +1316,6 @@ def test__get_all_events__segment(self): supported_objects=[neo.core.Segment, neo.core.Event]) targ = copy.deepcopy(obj) - obj.events.extend(obj.events) res0 = nt.get_all_events(obj) targ = targ.events @@ -1469,7 +1464,7 @@ def test__get_all_epochs__segment(self): obj = generate_one_simple_segment( supported_objects=[neo.core.Segment, neo.core.Epoch]) targ = copy.deepcopy(obj) - obj.epochs.extend(obj.epochs) + res0 = nt.get_all_epochs(obj) targ = targ.epochs