To shuffle in first dim:

$b=$a->( qsorti(random($a->dim(0))));

Stupid index tricks left as an exercise... :-)

(Mobile)


> On Mar 5, 2017, at 4:56 PM, Sergey Kolychev <[email protected]> 
> wrote:
> 
> Hello all,
> Hope you do not mind a quick question (I did search through the docs before 
> :-))
> Currently I am using 
> use List::Util qw(shuffle);
> use PDL;
> $p = cat(shuffle(dog($p))); 
> in order to accomplish the subject task.
> This does not seem particularly memory efficient, is there something that 
> does the shuffling in place ?
> Thanks in advance.
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> pdl-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
pdl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to