sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)

I am using sklearn and having a problem with the affinity propagation. I have built an input matrix and I keep getting the following error. ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’). I have run np.isnan(mat.any()) #and gets False np.isfinite(mat.all()) #and gets True I tried using mat[np.isfinite(mat) == True] = … Read more

ValueError: invalid literal for int() with base 10: ”

Why do I get this error? ValueError: invalid literal for int() with base 10: ”. 2Best Answer 21 Just for the record: >>> int(‘55063.000000’) Traceback (most recent call last): File “<stdin>”, line 1, in <module> ValueError: invalid literal for int() with base 10: ‘55063.000000’ Got me here… >>> int(float(‘55063.000000’)) 55063 Has to be used!