def find_repeats(arr):
    # Make sure we get a copy. ma.compressed promises a "new array", but can
    # actually return a reference.
    compr = np.asarray(ma.compressed(arr), dtype=np.float64)
    if compr is arr or compr.base is arr:
        compr = compr.copy()
    return _find_repeats(compr)
Find repeats in arr and return a tuple (repeats, repeat_count).
dataset/ETHPy150Open scipy/scipy/scipy/stats/mstats_basic.py/find_repeats