On Thu, Mar 13, 2008 at 9:49 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote:
> And for 1d array ``x`` you can always do::
>
>    strdata = list( fmt%xi for xi in x)
>
> Nice because the counter name does not "bleed" into your program.

On Thu, Mar 13, 2008 at 3:07 PM, David Huard <[EMAIL PROTECTED]> wrote:
> ['S%03d'%i for i in int_data]

Thanks for the suggestions! I wasn't sure if there was a magic numpy
method to do the loop quickly (as the destination array is created
beforehand) without creating a temporary Python list, but I guess not.
The generator/list-comprehension is likely better than my prototype.

Regards,
Alex
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to