Programmers learn & share
0 votes
45 views

Problem :

While submitting the Python program i am getting below error
python can't multiply sequence by non-int of type 'float'
by (6.9k points)   | 45 views

1 Answer

0 votes

Solution :

I had faced the same issue while trying to multiple a float and a list of floats. The issue was actually due to the use of * operator on a list.

The solution is to convert the list to numpy array:

coff = np.asarray(coff) * C

Further Readings:

https://github.com/ccxt/ccxt/issues/2419

by (36.1k points)  
edited by
2,227 questions
2,734 answers
59 comments
241 users