Repository navigation
Rename the spike vector caches to state which order they hold - #4817
Conversation
|
Good idea and more
|
|
I did the changes requested by Sam. |
|
I think I would also propose The only name I have an issue with is But more importantly, I am not sure whether this cache needs to exist as a separate thing at all. The unit-grouped cache already stores |
|
Thanks @grahamfindlay. a) Agree, they are not spike vectors anymore. I would avoid "view" though, as the unit-grouped one holds a full reordered copy ( b) and c) Agree that |
|
@samuelgarcia @chrishalcrow this is ok to merge on my end! |
|
Thanks @h-mayorquin for this I am not very familiar with the internals of the spike vector so was a useful read. To confirm, the current state / plan is: We previously had (after renaming): where previously This PR is done so feel free to ignore, I find the last change slightly confusing as its not clear what these things are (e.g. time_ordered what?). I would suggested |
|
Thanks @JoeZiminski, your summary is correct.
I would be OK with adding "spikes" to the names but see the discussion with Graham above. Once the caches became dicts the names said "spikes" twice, as in
I agree with both. I renamed |
|
@h-mayorquin could you update the original PR message with the final renaming? |
Updated the PR message. Merging :) |
I am not present in the library as much as I would like, and every time I come back I face the same problem of remembering what is the spike vector and what is the lexsorted one. I propose the following renames. I hope they improve clarity and help me remember what the two representations are for without having to look it up:
_cached_spike_vector->_cached_time_ordereddict, withspikes|segment_slicesfields_cached_lexsorted_spike_vector->_cached_unit_groupeddict, withspikes|unit_segment_slicesfields_cached_spike_vector_to_indices->_cached_time_ordered_indices_by_unit_cached_spike_vector_segment_slices-> removed, now_cached_time_ordered["segment_slices"]These are private attributes and none of them is serialized (pickling goes through
to_dict()). Saved objects are not affected.