Gael,

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]

You don't need subscripting, or recursive fns, or Knuth.
Runtime is almost instant (for n=10).
All the NumPy solutions look more painful, so if needs be, transform the NumPy 
sequences to Python ones.

Regards,
Stephen
_________________________________________________________________
Can you find the hidden words?  Take a break and play Seekadoo!
http://club.live.com/seekadoo.aspx?icid=seek_wlmailtextlink
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to