Typeerror: Can't Multiply Sequence By Non-int Of Type 'float' : Prblem With Numpy Arrays
I am pretty new to Python.I know this error occurs when one tries to multiply a string with a fraction i.e float. In my case , I can't figure out how can a numpy floating point arr
Solution 1:
pv_za_temp
is an ordinary Python list, which doesn't support scalar multiplication. You need a NumPy array, which you can create from a complete list by using
pv_za_temp = np.array(pv_za_temp)
Note that .array
doesn't support .append
. Either build the list completely in advance, or use hstack
or vstack
as appropriate.
Post a Comment for "Typeerror: Can't Multiply Sequence By Non-int Of Type 'float' : Prblem With Numpy Arrays"