[Numpy-discussion] Extracting all the possible combinations of a grid

Alan G Isaac aisaac@american....
Fri Sep 21 23:09:16 CDT 2007


On Fri, 21 Sep 2007, Stephen McInerney apparently wrote:
> The pure Pythonic solution is a list comprehension involving multiple sequences:
> x = range(0,n)
> y = x 
> z = x 
> t = [(xx,yy,zz) for xx in x for yy in y for zz in z] 

Different question ...

Cheers,
Alan Isaac





More information about the Numpy-discussion mailing list