From bc3c5f917b13c408753dc8fcf081e84eb74fe9bb Mon Sep 17 00:00:00 2001 From: Kevin Johnson Date: Sat, 19 Jun 2021 11:54:36 -0700 Subject: [PATCH] BUG #311 psar dmn iloc[-1] fix --- README.md | 2 +- pandas_ta/trend/psar.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b4d1a58..2e424aa 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ $ pip install pandas_ta Latest Version -------------- -Best choice! Version: *0.2.90b* +Best choice! Version: *0.2.91b* ```sh $ pip install -U git+https://github.com/twopirllc/pandas-ta ``` diff --git a/pandas_ta/trend/psar.py b/pandas_ta/trend/psar.py index 18fe263..04b05fa 100644 --- a/pandas_ta/trend/psar.py +++ b/pandas_ta/trend/psar.py @@ -20,7 +20,7 @@ def psar(high, low, close=None, af0=None, af=None, max_af=None, offset=None, **k # Not to be confused with ta.falling() up = high - high.shift(drift) dn = low.shift(drift) - low - _dmn = (((dn > up) & (dn > 0)) * dn).apply(zero)[-1] + _dmn = (((dn > up) & (dn > 0)) * dn).apply(zero).iloc[-1] return _dmn > 0 # Falling if the first NaN -DM is positive diff --git a/setup.py b/setup.py index d42acd0..51605cb 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( "pandas_ta.volatility", "pandas_ta.volume" ], - version=".".join(("0", "2", "90b")), + version=".".join(("0", "2", "91b")), description=long_description, long_description=long_description, author="Kevin Johnson",