def find_repeats(arr):
marr = ma.compressed(arr)<EOL>if not marr.size:<EOL><INDENT>return (np.array(<NUM_LIT:0>), np.array(<NUM_LIT:0>))<EOL><DEDENT>(v1, v2, n) = futil.dfreps(ma.array(ma.compressed(arr), copy=True))<EOL>return (v1[:n], v2[:n])<EOL>
Find repeats in arr and return a tuple (repeats, repeat_count).
    Masked values are discarded.

    Parameters
    ----------
    arr : sequence
        Input array. The array is flattened if it is not 1D.

    Returns
    -------
    repeats : ndarray
        Array of repeated values.
    counts : ndarray
        Array of counts.