提交 d9fee895 编写于 作者: Z zengbin93

0.5.6 fix divide by zero

上级 d0a388a4
......@@ -93,8 +93,8 @@ def KDJ(close: np.array, high: np.array, low: np.array):
hv.append(max(h_))
lv.append(min(l_))
hv = np.array(hv, dtype=np.double)
lv = np.array(lv, dtype=np.double)
hv = np.around(hv, decimals=2)
lv = np.around(lv, decimals=2)
rsv = np.where(hv == lv, 0, (close - lv) / (hv - lv) * 100)
k = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册