Webb Sprague wrote:
> Could someone recommend a way to average an array along the columns
> without propagating the nans and without turning them into some weird
> number which bias the result?  I guess I can just keep using an
> indexing array for fooArray, but if there is somehting more graceful,
> I would love to know.

Something like this:

import numpy as N
ym = N.ma.masked_where(N.isnan(y), y)
yaverage = N.ma.average(ym)

> 
> Boy missing data is a pain in the neck...

It certainly is, but Masked Arrays ease the pain.

Eric


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to