Re: [Numpy-discussion] strange nan in np.ma.average

2012-01-03 Thread Chao YUE
the problem is here, data=np.empty([10,90,720]) you should always use np.ma.empty if you want to construct a masked empty array. Chao 2012/1/3 Chao YUE > Dear all numpy users, > > I have 10 90X720 arrays. let's say they are in a list 'a' with each > element a 90X720 numpy masked array. > then

[Numpy-discussion] strange nan in np.ma.average

2012-01-03 Thread Chao YUE
Dear all numpy users, I have 10 90X720 arrays. let's say they are in a list 'a' with each element a 90X720 numpy masked array. then I create a new empty ndarray: data data=np.empty([10,90,720]) ##first I store all the 10 ndarray in a 10X90X720 array: for i,d in enumerate(a): data[i]=a dat