def cliffs_delta(control, test):
    """
    Computes Cliff's delta for 2 samples.
    See https://en.wikipedia.org/wiki/Effect_size#Effect_size_for_ordinal_data

    Keywords
    --------
    control, test: numeric iterables.
        These can be lists, tuples, or arrays of numeric types.

    Returns
    -------
        A single numeric float.
    """
    import numpy as np
    from scipy.stats import mannwhitneyu
    if control.__class__ != np.ndarray:
        control = np.array(control)
    if test.__class__ != np.ndarray:
        test = np.array(test)
    c = control[~np.isnan(control)]
    t = test[~np.isnan(test)]
    control_n = len(c)
    test_n = len(t)
    U, _ = mannwhitneyu(t, c, alternative='two-sided')
    cliffs_delta = 2 * U / (control_n * test_n) - 1
    return cliffs_delta
