[Numpy-discussion] Transforming an array of numbers to an array of formatted strings
Alan G Isaac
aisaac at american.edu
Thu Mar 13 15:22:46 EDT 2008
> 2008/3/13, Alan G Isaac <aisaac at american.edu>:
>> strdata = list( fmt%xi for xi in x)
>> Nice because the counter name does not "bleed" into your program.
On Thu, 13 Mar 2008, David Huard apparently wrote:
> ['S%03d'%i for i in int_data]
The difference is that the counter "bleeds"
from the list comprehension. I find that
obnoxious.
Cheers,
Alan Isaac
More information about the NumPy-Discussion
mailing list