Optimization/IOMixin: Fix set_timeseries for subslices of times
The stretch_values
function would only work if the subslice Timeseries
extended to the end of the existing io.times_sec
. In other words, it
would only ever prepend with NaNs, and never append them (contrary to
what the nearby comment stated).
This commit makes sure that we can call set_timeseries
with slices
that neither start nor end with the first and last value of
io.times_sec
. This can be useful when e.g. importing 1000 times with
CSVMixin, but overriding times()
to run timestep 100-150.