Fix conversion of timestamps to np array
@@ -564,13 +564,13 @@ class BaseRecordingSegment(BaseSegment):
def get_times(self):
if self.time_vector is not None:
- import h5py
+ # import h5py
if isinstance(self.time_vector, np.ndarray):
return self.time_vector
- elif isinstance(self.time_vector, h5py.Dataset):
- return self.time_vector[:]
+ # elif isinstance(self.time_vector, h5py.Dataset):
+ # return self.time_vector[:]
else:
- return self.time_vector.asarray()
+ return np.array(self.time_vector)
else:
time_vector = np.arange(self.get_num_samples(), dtype='float64')
time_vector /= self.sampling_frequency
