Skip to content

Commit 9549603

Browse files
authored
make sure the index rounds using np.ceil
1 parent 53b202b commit 9549603

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neo/io/proxyobjects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _time_slice_indices(self, time_slice, strict_slicing=True):
201201
assert self.t_start <= t_stop <= self.t_stop, 't_stop is outside'
202202
else:
203203
t_stop = min(t_stop, self.t_stop)
204-
i_stop = int((t_stop - self.t_start).magnitude * sr.magnitude)
204+
i_stop = int(np.ceil((t_stop - self.t_start).magnitude * sr.magnitude))
205205
return i_start, i_stop, sig_t_start
206206

207207
def load(self, time_slice=None, strict_slicing=True,

0 commit comments

Comments
 (0)