Skip to content

Commit 7b1d70b

Browse files
committed
ise int_like instead of int
1 parent ec34833 commit 7b1d70b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mne/annotations.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ def delete(self, idx):
521521
self.duration = np.delete(self.duration, idx)
522522
self.description = np.delete(self.description, idx)
523523
self.ch_names = np.delete(self.ch_names, idx)
524-
if isinstance(idx, int):
524+
if isinstance(idx, int_like):
525525
del self.details[idx]
526-
else:
526+
elif len(idx) > 0:
527527
for i in np.sort(np.arange(len(self.details))[idx])[::-1]:
528528
del self.details[i]
529529

0 commit comments

Comments
 (0)