[Numpy-discussion] which one is best?

Arnar Flatberg arnar.flatberg@gmail....
Fri Sep 19 09:14:38 CDT 2008


On Fri, Sep 19, 2008 at 4:09 PM, lorenzo <lbolla@gmail.com> wrote:

>
>
> On Fri, Sep 19, 2008 at 2:50 PM, Arnar Flatberg <arnar.flatberg@gmail.com>wrote:
>
>>
>>
>> I think
>> [x*y for x in a for y in b]
>> feels pythonic, however it has a surprisingly lousy performance.
>>
>>
> This returns a len(x)*len(y) long list, which is not what you want.
>

My bad, Its friday afternoon, I'll go home now :-)

Arnar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080919/49f0ba53/attachment.html 


More information about the Numpy-discussion mailing list