• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes

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)  

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:


by (21.9k points)  
edited by