sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’) | valueerror: input contains nan, infinity or a value too large for dtype(‘float64’).
This might happen inside scikit, and it depends on what you’re doing. I recommend reading the documentation for the functions you’re using. You might be using one which depends e.g. on your matrix being positive definite and not fulfilling that criteria.
np.isnan(mat.()) np.isfinite(mat. ())is obviously wrong. Right would be: