'Same as generate_advanced_index_tuples(), but also insert an
ellipsis at various points.'

def generate_advanced_index_tuples_with_ellipsis(self, N, maxdim, many=True):

    for tup in self.generate_advanced_index_tuples(N, maxdim, many):
        for i in range((len(tup) + 1)):
            (yield ((tup[:i] + (Ellipsis,)) + tup[i:]))
