def warn_if_not_float(X, estimator='<STR_LIT>'):
if not isinstance(estimator, str):<EOL><INDENT>estimator = estimator.__class__.__name__<EOL><DEDENT>if X.dtype.kind != '<STR_LIT:f>':<EOL><INDENT>warnings.warn("<STR_LIT>"<EOL>"<STR_LIT>" % (estimator, X.dtype))<EOL>return True<EOL><DEDENT>return False<EOL>
Warning utility function to check that data type is floating point.

    Returns True if a warning was raised (i.e. the input is not float) and
    False otherwise, for easier input validation.