gens.append(xrange(o, o + d))
cnt = 0
for tp in itertools.product(*gens):
coord = PhyDim2(*tp)
assert self.contains_node(coord)
cnt += 1
yield coord
After Change
def node_iter(self):
""" Iterate through all absolute node coordinates in the region. """
for rel_coord in itertools.product(*[range(d) for d in self.dim]):
yield self.rel2abs(PhyDim2(*rel_coord))
def rel2abs(self, rel_coordinate):