Skip to content

Commit cad3f68

Browse files
committed
Revert "Raise an IndexError when slicing a single-segment PS"
This reverts commit b12edb9.
1 parent 8fe51df commit cad3f68

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

filter_functions/pulse_sequence.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,6 @@ def __getitem__(self, key) -> 'PulseSequence':
395395
new_dt = np.atleast_1d(self.dt[key])
396396
if not new_dt.size:
397397
raise IndexError('Cannot create empty PulseSequence')
398-
if len(self) == 1:
399-
raise IndexError('invalid index to scalar (single-segment) PulseSequence')
400398

401399
new = self.__class__(
402400
c_opers=self.c_opers,

0 commit comments

Comments
 (0)