def region_gen(region): lower, upper = regions[region] area = np.product(upper - lower) # TODO: sample proportional to area while True: q = ARRAY(sample_box(regions[region])) samples.append(q) yield (q,)
def region_gen(region): while True: q = sample_box(regions[region]) samples.append(q) yield (q, )