Webb Sprague schrieb: > 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.
You could take advantage of the nan-related functions: >>> help(numpy.nansum) Help on function nansum in module numpy.lib.function_base: nansum(a, axis=-1) Sum the array over the given axis, treating NaNs as 0. > > Boy missing data is a pain in the neck... > Btw, do you know what is treated as NaN in numpy when getting the data from some external source (file, python list etc.), apart from None? I asked that on this list but it apparently went unnoticed. Cheers, Sven ------------------------------------------------------------------------- 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