def complement(ind_arr, n):
    """
    Find the complement of the set of indices in ind_arr from
    arange(n)
    """

    mat = numarray.ones(n)
    numarray.put(mat, ind_arr, 0)
    out = numarray.nonzero(mat)
    return out[0]

    Find the complement of the set of indices in ind_arr from
    arange(n)
    
recipes/Python/334916_A_numarray_set_complement/recipe-334916.py