BUG #354 var and stdev ddof

This commit is contained in:
Kevin Johnson
2021-07-26 10:26:52 -07:00
parent a3bdc6c165
commit 5d7a334b81
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ $ pip install pandas_ta
Latest Version
--------------
Best choice! Version: *0.3.12b*
Best choice! Version: *0.3.13b*
* Includes all fixes and updates between **pypi** and what is covered in this README.
```sh
$ pip install -U git+https://github.com/twopirllc/pandas-ta
+1 -1
View File
@@ -9,7 +9,7 @@ def stdev(close, length=None, ddof=None, talib=None, offset=None, **kwargs):
"""Indicator: Standard Deviation"""
# Validate Arguments
length = int(length) if length and length > 0 else 30
ddof = int(ddof) if ddof and ddof >= 0 and ddof < length else 1
ddof = int(ddof) if isinstance(ddof, int) and ddof >= 0 and ddof < length else 1
close = verify_series(close, length)
offset = get_offset(offset)
mode_tal = bool(talib) if isinstance(talib, bool) else True
+1 -1
View File
@@ -7,7 +7,7 @@ def variance(close, length=None, ddof=None, talib=None, offset=None, **kwargs):
"""Indicator: Variance"""
# Validate Arguments
length = int(length) if length and length > 1 else 30
ddof = int(ddof) if ddof and ddof >= 0 and ddof < length else 0
ddof = int(ddof) if isinstance(ddof, int) and ddof >= 0 and ddof < length else 1
min_periods = int(kwargs["min_periods"]) if "min_periods" in kwargs and kwargs["min_periods"] is not None else length
close = verify_series(close, max(length, min_periods))
offset = get_offset(offset)
+1 -1
View File
@@ -19,7 +19,7 @@ setup(
"pandas_ta.volatility",
"pandas_ta.volume"
],
version=".".join(("0", "3", "12b")),
version=".".join(("0", "3", "13b")),
description=long_description,
long_description=long_description,
author="Kevin Johnson",