r"""
    Filters out variants with the same genetic profile.

    Parameters
    ----------
        G : (`n_inds`, `n_snps`) array
            Genetic data

    Returns
    -------
        G_out : (`n_inds`, `n_unique_snps`) array
            filtered genetic data
        idxs : int array
            indexes of the the unique variants

def unique_variants(G):
    r"""
    Filters out variants with the same genetic profile.

    Parameters
    ----------
        G : (`n_inds`, `n_snps`) array
            Genetic data

    Returns
    -------
        G_out : (`n_inds`, `n_unique_snps`) array
            filtered genetic data
        idxs : int array
            indexes of the the unique variants
    """
    _s = sp.dot(sp.rand(G.shape[0]), G)
    v, ix = sp.unique(_s, return_index=True)
    ix = sp.sort(ix)
    G_out = G[:, ix]
    return G_out, ix