@Craig, >> Argh. I should have read your whole post before hitting "Send". Sorry. whichND returns true values in a mask PDL. >> So you can use the form I gave or "$location = ($a>30)->whichND()" or "$location = whichND($a>30)". If you ask for >> "$a->whichND($a>30)", that is the same as "whichND($a,$a>30)", and the second argument gets more-or-less ignored.
Thanks! That's the part I was missing. @Chris, >> Also, please don't post to both perldl and pdl-porters. Sorry about that. I included porters out of habit. I agree we don't want the internal list filling with non-innards questions. :-) Thanks again. - Tim On Sat, Aug 4, 2012 at 2:55 PM, chm <[email protected]> wrote: > Hi Tim- > > I see Craig has already responded. > > It appears that the whichND docs need to > be updated---I am familiar with whichND() > and reading the help output was not > clear. :-( I guess this classifies as > a documentation bug. > > Also, please don't post to both perldl and > pdl-porters. The purposes of the two lists > are different and, except for announcements, > appropriate discussions don't overlap. > > I.e., > from > http://pdl.perl.org/?page=**mailing-lists<http://pdl.perl.org/?page=mailing-lists> > > The "PerlDL" list is the best place to ask general user questions. >> It also features non-technical discussions about PDL, announcements, >> etc. >> > > and > > The "PDL Porters" list is where developers work on the internals of >> PDL. Discussions often get quite technical. Join this list if you'd >> like to contribute to PDL. >> > > Thanks, > Chris > > > On 8/4/2012 1:07 PM, Tim Haines wrote: > >> Hi, all. >> >> I am trying to find the 2D coordinates of particular values in a >> piddle. I came up with the following, but is there an easier >> (better?) way? I was thinking that whichND would do this directly >> without the call to ndcoords, but it always returns *all* of the >> coordinates- not just the ones that match the mask. >> >> use PDL; $a = sequence(10,5); $b = >> $a->ndcoords->mv(0,2)->**whereND($a>30); print $a, join(',', >> $b->dims()), "\n", $b; >> >> >> Many thanks. >> >> - Tim >> >> >> >> ______________________________**_________________ Perldl mailing list >> [email protected] >> http://mailman.jach.hawaii.**edu/mailman/listinfo/perldl<http://mailman.jach.hawaii.edu/mailman/listinfo/perldl> >> >> >
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
