Mark Pfeiffer writes:
> ... [snip] ...
> 
> I am certain I have some fundamental
> misunderstanding of uniqvec here.
> 
> Can someone please explain how I
> should be going about getting all the
> unique rows from $pdl.

Looks like it is a bug in uniqvec.  If you edit the
return lines for PDL::uniqvec from the PDL/Primitive.pm
file (?uniqvec in the perldl shell should tell you where
the file is in the "Docs from ...") from

line#
 695   return $uniq->nelem==0 ?
 696         $srt->slice(":,(0)") :
 697         $srt->dice($uniq)->mv(0,-1);

to

line#
 695   return $uniq->nelem==0 ?
 696         $srt->slice("0,:")->mv(0,-1) :                                     
                                                                
 697         $srt->dice($uniq)->mv(0,-1);

it should return the correct value.  NOTE: this
bug only happens when all the vectors are the
same, if there had been at least two uniq
vectors in the data you would have been "ok".

--Chris



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

Reply via email to