def unique_variants(G):
_s = sp.dot(sp.rand(G.shape[<NUM_LIT:0>]), G)<EOL>v, ix = sp.unique(_s, return_index=True)<EOL>ix = sp.sort(ix)<EOL>G_out = G[:, ix]<EOL>return G_out, ix<EOL>
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