transpose array
Aahz
aahz at pythoncraft.com
Fri Oct 30 13:38:41 EDT 2009
In article <mailman.2137.1256686009.2807.python-list at python.org>,
Rhodri James <rhodri at wildebst.demon.co.uk> wrote:
>
>Surely more Pythonic would be:
>
>for t in zip(xVec, yVec, zVec):
> print >>f, ", ".join(t)
Except that you *really* want itertools.izip() if these vectors are
likely to be any significant size.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"You could make Eskimos emigrate to the Sahara by vigorously arguing --
at hundreds of screens' length -- for the wonder, beauty, and utility of
snow." --PNH to rb in r.a.sf.f
More information about the Python-list
mailing list