(X, **kwargs)
return check_array(X, **kwargs)
Modified version of :func:`sklearn.utils.validation.check_array. When
    keyword parameter `force_all_finite` is set to False, NaNs are not
    accepted but infinity is.
Modified version of :func:`sklearn.utils.validation.check_array. When
    keyword parameter `force_all_finite` is set to False, NaNs are not
    accepted but infinity is.
Modified version of : func : sklearn . utils . validation . check_array . When keyword parameter force_all_finite is set to False NaNs are not accepted but infinity is .
def _check_array_mod(X, **kwargs):
    """Modified version of :func:`sklearn.utils.validation.check_array. When
    keyword parameter `force_all_finite` is set to False, NaNs are not
    accepted but infinity is."""
    if not kwargs.get('force_all_finite', True):
        Xnew = check_array(X, **kwargs)
        if np.isnan(Xnew if not issparse(Xnew) else Xnew.data).any():
            raise ValueError("Input contains NaNs. Only finite values and "
                             "infinity are allowed when parameter "
                             "`force_all_finite` is False.")
        return Xnew
    return check_array(X, **kwargs)
def _check_array_mod ( X , * * kwargs ) : if not kwargs . get ( 'force_all_finite' , True ) : Xnew = check_array ( X , * * kwargs ) if np . isnan ( Xnew if not issparse ( Xnew ) else Xnew . data ) . any ( ) : raise ValueError ( "Input contains NaNs. Only finite values and " "infinity are allowed when parameter " "`force_all_finite` is False." ) return Xnew return check_array ( X , * * kwargs )