trendln
trendln copied to clipboard
Error when using calc_support_resistance with certain parameters
I want to first thank you for this contribution. This library is great.
I am using Python 3.7.5
Using extmethod=METHOD_NAIVECONSEC
throws the following error
File "pandas/_libs/tslibs/c_timestamp.pyx", line 236, in
pandas._libs.tslibs.c_timestamp._Timestamp.__add__
TypeError: Addition/subtraction of integers and integer-arrays with Timestamp is no longer
supported. Instead of adding/subtracting `n`, use `n * obj.freq`
Using method=trendln.METHOD_HOUGHPOINTS
throws the following error
File "/usr/local/lib/python3.7/site-packages/trendln/__init__.py", line 587, in hough_points
rhos = np.linspace(-diag_len, diag_len, diag_len * 2.0)
File "<__array_function__ internals>", line 6, in linspace
File "/usr/local/lib/python3.7/site-packages/numpy/core/function_base.py", line 121, in linspace
.format(type(num)))
TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.
Furthermore, I'm wondering if you're open to taking feature request like more efficient calculation given stream of data?