You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there, I want to report the following bug.
In case I am not correct and this is wrong use on my end, I wonder if documentation needs to be updated.
All the best!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/traces/timeseries.py", line 778, in merge
default = operation(default)
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
The text was updated successfully, but these errors were encountered:
I found a work around for now. It would seem that NoneType is produced probably when data is not present for the time interval being merged and aggregated. Passing in a custom aggregate function that forces NoneType to 0 worked for me:
@ThomDietrich thanks for opening this issue! It's a great idea to improve the documentation about this.
(The Exception is the desired behavior in this case. The first time series has the default value None for all times, and the second is None for all times before 2, and then 3 afterwards. At, for example, t=4, merge with operation=sum is summing None + 3, and does not automatically assume that Nones should be ignored).
Thanks @tasq-inc for posting a solution. This solution or something similar is exactly what I'd suggest using if you want to ignore Nones.
Hey there, I want to report the following bug.
In case I am not correct and this is wrong use on my end, I wonder if documentation needs to be updated.
All the best!
Python 3.8.5, traces 0.6.0
The text was updated successfully, but these errors were encountered: