I have recently encountered a weird problem with stats (or statsover) using bad values. The resulting numbers have a strange property, they always return true in comparisons. This code:
use PDL; use PDL::NiceSlice; my $x = pdl(1, 2, 3, 0); $x->badflag(1); $x->badvalue(0); print "m = $m, s = $s\n"; print "s greater than zero\n" if $s > 0; print "s less than zero\n" if $s < 0; print "s equals zero\n" if $s == 0; returns the following output: x = [1 2 3 BAD] m = 2, s = 1 s greater than zero s less than zero s equals zero which doesn't make any sense. Can anyone explain this? I always assumed that 'stats' returned ordinary Perl scalars, but this must be something different. I'm using PDL version 2.007. We had an older version installed for a long time and I think this problem appeared when we upgraded to 2.007. Marek
------------------------------------------------------------------------------
_______________________________________________ pdl-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pdl-general
