n_periods must be an int
时间: 2024-04-30 20:21:44 浏览: 170
ATR.zip_ATR_K._atr 算法
This error usually occurs in Python when you are trying to pass a non-integer value to a function that expects an integer argument for the number of periods. To fix this error, you can convert the non-integer value to an integer using the int() function. For example:
```
n_periods = int(n_periods)
```
This will convert the value of n_periods to an integer and allow you to pass it to the function without triggering the error.
阅读全文