Python: Can’t convert float NaN to integer
Based on what you have posted, your movingAverage() function is returning NaN at some point. NaN is a special floating point sentinel value, meaning “Not a Number.” In general, Python prefers raising an exception to returning NaN, so things like sqrt(-1) and log(0.0) will generally raise instead of returning NaN. However, you may get this value back from some other library. A good example might be … Read more