sklearn.utils.assert_all_finite

sklearn.utils.assert_all_finite(X)[source]

Throw a ValueError if X contains NaN or infinity.

Parameters:
X : array or sparse matrix