out_start, out_stop, out_interval = output_steps
out_num = len(range(out_start, out_stop, out_interval))
tt = out_start + out_interval * (out_num - 1) + 1
if not (source_waveform.ndim == 2 and source_waveform.shape == (tt, 2)):
raise ValueError(
f"source_waveform must be of shape (tt, 2) = ({tt}, 2), but got "
f"{source_waveform.shape} instead.")
Since tt is calculated internally, one would need to do the same calculation outside to figure out the length of the input param source_waveform -- is this intended? One consequence is that whenever one changes output_steps, even just the interval value, this ValueError is often raised. Maybe allow source_waveform to be longer and only use the first tt elements?
In
fdtdz
there is:Since
tt
is calculated internally, one would need to do the same calculation outside to figure out the length of the input paramsource_waveform
-- is this intended? One consequence is that whenever one changesoutput_steps
, even just the interval value, thisValueError
is often raised. Maybe allowsource_waveform
to be longer and only use the firsttt
elements?