To recap, I have the following

    PDL: Float D [100,271117]

I am calculating the averages across the 0th dim as following

    my $xpdl = $pdl->xchg(0, 1);
    my $yavgs = $xpdl->average;

When I print out my $yavgs, I get the following

On Fri, Aug 27, 2010 at 12:41 AM, P Kishor <[email protected]> wrote:


> [nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan]
>

Turns out, at least one cell has somehow acquired NaN values. That one
(or more) cell with NaN is causing the averages of all other cells
also to become NaN. I know that at least one other cell is ok. I
printed all 100 values of a specific cell using $pdl->at(), and got
good looking values with which I was able to computer averages and
sums and such.

So, can I instruct PDL to ignore cells with NaN, but not barf for
other good cells? Note that I am already setting PDL to ignore BAD
values (equal to -9999, in my case).




-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to