Mark Dickinson added the comment:
When you do:
FINUB = np.empty(len(close))
FINLB = np.empty(len(close))
you're creating two *uninitialised* arrays of values. (See the NumPy
documentation at
https://numpy.org/doc/stable/reference/generated/numpy.empty.html.)
When you then do
Steven D'Aprano added the comment:
Please try to provide a minimal reproducible example:
https://stackoverflow.com/help/minimal-reproducible-example
http://sscce.org/
At the very least, you need to provide three pieces of information:
1. What you tried.
2. What you expected to happen (and w
Eric V. Smith added the comment:
This is likely not a bug in python. You might have better luck asking on a
numpy support list.
That said, what results do you get, and what do you expect to get? We don't
know what error you're seeing.
You might replace:
print("LB: ", LB)
with:
str(LB)
and
New submission from wby78826 :
(Could be a numpy bug)
##Just run the script, then uncomment Line 14 and run again
The result of "supertrend" is different, depending on whether I print "LB"
first or not.
If I don't print it first, the result is wrong.
It also does'nt matter if I print it to std