Commit e3308d25 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

fix numpy exception

parent f4eaec17
......@@ -47,7 +47,7 @@ class TimeSeries:
def diff(name, ts1, ts2):
"""Returns difference between values of two Timeseries objects.
if ts1.time==ts2.time:
if len(ts1.time) == len(ts2.time):
ts_diff = TimeSeries(name, ts1.time, (ts1.values - ts2.values))
else: # different timestamps, common time vector and interpolation required before substraction
time = sorted(set(list(ts1.time) + list(ts2.time)))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment