Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions neo/core/analogsignal.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,15 @@ def time_slice(self, t_start, t_stop):
'''

# checking start time and transforming to start index
if t_start == None:
if t_start is None:
i = 0
else:
t_start = t_start.rescale(self.sampling_period.units)
i = (t_start - self.t_start) / self.sampling_period
i = int(np.rint(i.magnitude))

# checking stop time and transforming to stop index
if t_stop == None:
if t_stop is None:
j = len(self)
else:
t_stop = t_stop.rescale(self.sampling_period.units)
Expand Down