Returns potential outliers as either a boolean array or a subset of the original.
    Parameters:
    df - array_like
        Series or dataframe to check
    output_type - string, default 'values'
        if 'values' is specified, then will output the values in the series that are suspected
        outliers. Else, a boolean array will be outputted, where True means the value is an outlier
    dtype - string, default 'number'
        the way to treat the object. Possible values are 'number','datetime',
        'timedelt','datetimetz','category',or 'object'
    sensitivity - number, default 1.5
        The value to multipy by the iter-quartile range when determining outliers. This number is used
        for categorical data as well.

def outliers(df,output_type = 'values',dtype = 'number',sensitivity = 1.5):# can output boolean array or values
    """ Returns potential outliers as either a boolean array or a subset of the original.
    Parameters:
    df - array_like
        Series or dataframe to check
    output_type - string, default 'values'
        if 'values' is specified, then will output the values in the series that are suspected
        outliers. Else, a boolean array will be outputted, where True means the value is an outlier
    dtype - string, default 'number'
        the way to treat the object. Possible values are 'number','datetime',
        'timedelt','datetimetz','category',or 'object'
    sensitivity - number, default 1.5
        The value to multipy by the iter-quartile range when determining outliers. This number is used
        for categorical data as well.
    """
    if dtype in ('number','datetime','timedelt','datetimetz'):
        if not dtype == 'number':
            df = pd.to_numeric(df,errors = 'coerce')
        quart25, quart75 = percentiles(df,q = [.25,.75]) 
        out_range= sensitivity * (quart75 - quart25)
        lower_bound,upper_bound = quart25-out_range, quart75+out_range
        bool_array = (df < lower_bound)|(df > upper_bound)
    else:
        value_counts = df.value_counts() # Trying to find categorical outliers.
        quart25 = cum_percentile(value_counts,.25)
        quart75 = cum_percentile(value_counts,.75)
        out_values = int(sensitivity * (quart75 - quart25) + quart75 + 1)
        if out_values >= len(value_counts):
            bool_array = _utils.bc_vec(df,value = False)
        else:
            outlier_values = value_counts[value_counts <= value_counts.iloc[out_values]].index
            bool_array = df.isin(outlier_values)
        
    if output_type == 'values':
        return  df[bool_array]
    return bool_array