[Numpy-discussion] is this a bug?

Stefan Kuzminski pontifor at yahoo.com
Fri Aug 26 10:26:48 CDT 2005


>>> from numarray import *
>>> x = ones(22400,Float)
>>> print add.reduce(x)
22400.0
>>> print add.reduce(x!=0)
-128
>>> print add.reduce((x!=0).astype(Int))
22400

it seems like the boolean result of the expression ( middle try )
causes a problem?

thanks,
Stefan Kuzminski


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 




More information about the Numpy-discussion mailing list