Skip to content

Commit

Permalink
Issue with kept indices
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed Jul 1, 2024
1 parent c37dae3 commit 14d2002
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spikeinterface/core/analyzer_extension_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _merge_extension_data(
valid = kept_indices[self.sorting_analyzer.get_extension("random_spikes")._get_data()]
nb_skipped = np.cumsum(~kept_indices)
new_data["random_spikes_indices"] = np.flatnonzero(valid)
new_data["random_spikes_indices"] -= nb_skipped[valid]
new_data["random_spikes_indices"] -= nb_skipped[new_data["random_spikes_indices"]]
else:
new_data["random_spikes_indices"] = self.data["random_spikes_indices"]
return new_data
Expand Down

0 comments on commit 14d2002

Please sign in to comment.