Noob python coder and can't understand how to set up and store elements in a rolling window
Not sure what I am doing wrong but when I run this code I end up with the error message and I can't figure out how to fix the rolling windows. There is a lot more in this code but the error is located here:
Runtime Error: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the 'NoneType'>) method. Please check out the API documentation.
import numpy as np
#in Initialize
self.legnth = 5
self.SetWarmUp(timedelta(self.legnth))
self.arrary1 = RollingWindow[float](self.legnth)
self.arrary2 = RollingWindow[float](self.legnth)
#in function
if condition:
self.arrary1.Add(x)
else
self.arrary1.Add(y)
if not self.arrary1.IsReady:
return
element2 = np.sum(self.arrary1)
self.arrary2.Add(element2)
if not self.arrary2.IsReady
return