diff --git a/qupulse/program/waveforms.py b/qupulse/program/waveforms.py index 9cdcbf4f..e08e410f 100644 --- a/qupulse/program/waveforms.py +++ b/qupulse/program/waveforms.py @@ -369,8 +369,8 @@ def unsafe_sample(self, entries = self._table for entry1, entry2 in pairwise(entries): - indices = slice(np.searchsorted(sample_times, entry1.t, 'left'), - np.searchsorted(sample_times, entry2.t, 'right')) + indices = slice(sample_times.searchsorted(entry1.t, 'left'), + sample_times.searchsorted(entry2.t, 'right')) output_array[indices] = \ entry2.interp((float(entry1.t), entry1.v), (float(entry2.t), entry2.v), @@ -626,7 +626,7 @@ def unsafe_sample(self, # indexing in numpy and their copy/reference behaviour end = time + subwaveform.duration - indices = slice(*np.searchsorted(sample_times, (float(time), float(end)), 'left')) + indices = slice(*sample_times.searchsorted((float(time), float(end)), 'left')) subwaveform.unsafe_sample(channel=channel, sample_times=sample_times[indices]-np.float64(time), output_array=output_array[indices]) @@ -843,7 +843,7 @@ def unsafe_sample(self, time = 0 for _ in range(self._repetition_count): end = time + body_duration - indices = slice(*np.searchsorted(sample_times, (float(time), float(end)), 'left')) + indices = slice(*sample_times.searchsorted((float(time), float(end)), 'left')) self._body.unsafe_sample(channel=channel, sample_times=sample_times[indices] - float(time), output_array=output_array[indices])