(color_features)
return color_features_kind
Determine whether color_features is array, pandas dataframe, callable,
    or scikit-learn (fit-)transformer.
Determine whether color_features is array, pandas dataframe, callable,
    or scikit-learn (fit-)transformer.
Determine whether color_features is array pandas dataframe callable or scikit - learn ( fit - ) transformer .
def _infer_color_features_kind(color_features):
    """Determine whether color_features is array, pandas dataframe, callable,
    or scikit-learn (fit-)transformer."""
    if hasattr(color_features, "dtype") or hasattr(color_features, "dtypes"):
        raise ValueError("`color_features` should not be a numpy array or "
                         "pandas dataframe.")
    elif hasattr(color_features, "fit_transform"):
        color_features_kind = "fit_transformer"
    elif hasattr(color_features, "transform"):
        color_features_kind = "transformer"
    elif callable(color_features):
        color_features_kind = "callable"
    elif color_features is None:
        color_features_kind = "none"
    else:  # Assume color_features is a selection of columns
        color_features_kind = "else"

    return color_features_kind
def _infer_color_features_kind ( color_features ) : if hasattr ( color_features , "dtype" ) or hasattr ( color_features , "dtypes" ) : raise ValueError ( "`color_features` should not be a numpy array or " "pandas dataframe." ) elif hasattr ( color_features , "fit_transform" ) : color_features_kind = "fit_transformer" elif hasattr ( color_features , "transform" ) : color_features_kind = "transformer" elif callable ( color_features ) : color_features_kind = "callable" elif color_features is None : color_features_kind = "none" else : # Assume color_features is a selection of columns color_features_kind = "else" return color_features_kind