Skip to content

Commit

Permalink
Merge pull request #3432 from alejoe91/save-non-array-times
Browse files Browse the repository at this point in the history
Fix bug in saving zarr recordings
  • Loading branch information
alejoe91 authored Sep 23, 2024
2 parents f576da3 + 778b773 commit 0e72755
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/spikeinterface/core/baserecording.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,11 +608,11 @@ def _save(self, format="binary", verbose: bool = False, **save_kwargs):
probegroup = self.get_probegroup()
cached.set_probegroup(probegroup)

time_vectors = self._get_time_vectors()
if time_vectors is not None:
for segment_index, time_vector in enumerate(time_vectors):
if time_vector is not None:
cached.set_times(time_vector, segment_index=segment_index)
for segment_index in range(self.get_num_segments()):
if self.has_time_vector(segment_index):
# the use of get_times is preferred since timestamps are converted to array
time_vector = self.get_times(segment_index=segment_index)
cached.set_times(time_vector, segment_index=segment_index)

return cached

Expand Down

0 comments on commit 0e72755

Please sign in to comment.