Skip to content

Conversation

@samuelgarcia
Copy link
Member

Idea from Pierre Yger:
Implement the sorting._cached_lexsorted_spike_vector
This PR also remove the sorting._cached_spike_trains because it become useless

The must merged and discussed before #4308

@yger

To be discussed 2 possibilities:

  • we have 2 functions : to_spike_vector() + to_reordered_spike_vector()
  • to_spike_vector() have a lexsort option and can render diffrent order

@yger
Copy link
Collaborator

yger commented Jan 14, 2026

Can I start building my PR on this one ? @samuelgarcia

@alejoe91 alejoe91 added the core Changes to core module label Jan 14, 2026
if propagate_cache and self._cached_spike_trains is not None:
sorting._cached_spike_trains = self._cached_spike_trains
if propagate_cache:
sorting._cached_lexsorted_spike_vector = deepcopy(self._cached_lexsorted_spike_vector)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be None, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is an empty dict by default I change it with len() > 0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also did more cache propagation now

@samuelgarcia
Copy link
Member Author

@alejoe91 @chrishalcrow more or less ready on my side

@yger yger merged commit 840c056 into SpikeInterface:main Jan 14, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants