ticts
ticts copied to clipboard
+= not working as expected
I would expect that using
ts[s:e] += 3
would result in the timeseries being incremented by 3 on the interval s:e.
It is not the case. A new timeseries is embedded in the first (see below)
Example
import ticts
ts = ticts.TimeSeries({"2024-01-01":1,"2025-01-01":2},default=0)
ts["2024-07-01":"2025-07-01"]+=3
ts
> <TimeSeries> (default=0)
> 2024-01-01T00:00:00+00:00: 1,
> 2024-07-01T00:00:00+00:00: <TimeSeries> (default=3)
> 2024-07-01T00:00:00+00:00: 4,
> 2025-01-01T00:00:00+00:00: 5,,
> 2025-07-01T00:00:00+00:00: 2,