Skip to content

Commit

Permalink
Correct slice in case stop is given
Browse files Browse the repository at this point in the history
  • Loading branch information
moble committed Dec 18, 2024
1 parent 8163782 commit f7b8fc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sxs/waveforms/waveform_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __getitem__(self, key):
sl = key[1]
if sl.step is None or sl.step==1:
ell1, m1 = self.LM[sl.start or 0] # in case sl.start is None
ell2, m2 = self.LM[sl.stop or 0 -1] # in case sl.stop is None
ell2, m2 = self.LM[(sl.stop or 0)-1] # in case sl.stop is None
if ell1 <= ell2 and m1 == -ell1 and m2 == ell2:
# The sliced object has valid ell_min and ell_max values,
# so we can interpret it as a WaveformModes object; we
Expand Down

0 comments on commit f7b8fc0

Please sign in to comment.