From 25560d0da202fafbef96ff997d5b86c144f4c6d6 Mon Sep 17 00:00:00 2001 From: Urban Ottosson Date: Mon, 19 Jul 2021 15:52:12 +0200 Subject: [PATCH] Removed the need to call bind explicitly --- examples/ni.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/examples/ni.py b/examples/ni.py index 0431946..41aedc0 100644 --- a/examples/ni.py +++ b/examples/ni.py @@ -73,17 +73,7 @@ Returns: # - Define a matching class method -------------------------------------------- -# NOTE: we need to temporarily use another name for the method than for the -# function to avoid a name conflict in this module. But by using the bind -# function below we can name it right so that doesn't really matter. -# Just remember to rename the method if you at a later stage decide to move it -# into the core.py module inside pandas_ta def ni_method(self, length=None, offset=None, **kwargs): close = self._get_column(kwargs.pop("close", "close")) result = ni(close=close, length=length, offset=offset, **kwargs) - return self._post_process(result, **kwargs) - -# - Bind the function to pandas_ta and the method to AnalysisIndicators ------- - -from pandas_ta.custom import bind -bind('ni', ni, ni_method) \ No newline at end of file + return self._post_process(result, **kwargs) \ No newline at end of file