logo       

sum of a masked array: msg#00000

python.numeric.general

Subject: sum of a masked array

Hi, I'm new to the list. I am having some difficulty finding the sum of a masked array. I'm using numarray 1.0 installed on winXP with Python 2.3.4.

from numarray.ma import *
Rx = ones((2500,2500))
N = make_mask_none((2500,2500))
Rx = array(Rx,mask=N)
print average(Rx) ## works
print sum(Rx) ## gives an error message 16 lines long, the most recent being a type error.

Is there something obvious I am doing wrong here?



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise