[Numpy-discussion] bad generator behaviour with sum
listservs at mac.com
listservs at mac.com
Sun Aug 27 14:22:50 CDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It seems like numpy.sum breaks generator expressions:
In [1]: sum(i*i for i in range(10))
Out[1]: 285
In [2]: from numpy import sum
In [3]: sum(i*i for i in range(10))
Out[3]: <generator object at 0x10eca58>
Is this intentional? If so, how do I get the behaviour that I am after?
Thanks,
C.
- --
Christopher Fonnesbeck
+ Atlanta, GA
+ fonnesbeck at mac.com
+ Contact me on AOL IM using email address
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFE8fEKkeka2iCbE4wRAoi6AKCjqJHodGOme56nohrG3X/njjaHgACeIkyn
PPB2+plZOyqV+HyLJgO+sSw=
=Y0wt
-----END PGP SIGNATURE-----
More information about the Numpy-discussion
mailing list