'Generates extents'

def iter_contiguous_extent(self):

    if (self.is_c_contig or self.is_f_contig):
        (yield self.extent)
    else:
        if (self.dims[0].stride < self.dims[(-1)].stride):
            innerdim = self.dims[0]
            outerdims = self.dims[1:]
            outershape = self.shape[1:]
        else:
            innerdim = self.dims[(-1)]
            outerdims = self.dims[:(-1)]
            outershape = self.shape[:(-1)]
        if innerdim.is_contiguous(self.itemsize):
            oslen = [range(s) for s in outershape]
            for indices in itertools.product(*oslen):
                base = compute_index(indices, outerdims)
                (yield ((base + innerdim.start), (base + innerdim.stop)))
        else:
            oslen = [range(s) for s in self.shape]
            for indices in itertools.product(*oslen):
                offset = compute_index(indices, self.dims)
                (yield (offset, (offset + self.itemsize)))
