Skip to content

Commit

Permalink
Update qiskit_dynamics/signals/signals.py
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Puzzuoli <[email protected]>
  • Loading branch information
to24toro and DanPuzzuoli authored Oct 30, 2023
1 parent 94480ea commit 5a6b474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit_dynamics/signals/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def __len__(self):
def __getitem__(self, idx: Union[ArrayLike, slice]) -> Union[Signal, "SignalCollection"]:
"""Get item with NumPy-style subscripting, as if this class were a 1d array."""

if type(idx) != int and type(idx) != slice and type(idx) != list and idx.ndim > 0:
if type(idx) != slice and unp.asarray(idx).ndim > 0:
idx = list(idx)

# get a list of the subcomponents
Expand Down

0 comments on commit 5a6b474

Please sign in to comment.