The way I expected to get this to work would be to set the badvalue flag for 
the non-positive elements of your arrays and then the oddpctover() would just 
work:

(1) the various pctover() routines do not seem to handle bad values so this 
doesn't work

(2) lack of bad value support is not documented

(3) a bug in pctover() was reported and fixed in PDL-2.4.3cvs but the code for 
oddpctover() was not updated with the same fix and is likely present (see the 
sourceforge bug tracker for the specific item

(4) it would be nice to fix this before the PDL-2.4.4 release but I don't know 
if I'll have time to get to it.  It should be straightforward to modify the 
current code to stop the pct ranking as soon as BAD is hit from the qsort step 
in Basic/Ufunc/ufunc.pd.

The following sequence might help you with the coding:

  $a = (random(10,4)*10)->long;
  $abad = $a->setbadif($a < 3);
  $absort = $abad->qsort;

Now $absort has all the good values from $a in the first part of dim(0) and the 
number of good elements in each row is just:

  $num = $absort->dim(0) - $absort->nbadover;

Hope this helps,
Chris
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to