roark has asked for the wisdom of the Perl Monks concerning the following question:
I am hoping via a single function, threading will be much faster. Seeking wisdom, any help appreciated$dec = pdl [[1,1,2,2,2],[10,15,13,11,4]]; my $min = $dec->(:,0) ->minimum; my $max = $dec->(:,0) ->maximum; print $max,"fwe\n"; $v = zeroes(2,2); $v(0,0) .= $min; $v(0,1) .= $max; for (my $i =$min; $i< 3; $i++) { $v(1,$i-1) .= $dec->(:,1)-> index(which $dec->(:,0) eq $i)->maximu +m; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PDL threading where/which instead of loop
by BrowserUk (Patriarch) on Aug 18, 2013 at 19:42 UTC | |
by roark (Initiate) on Aug 18, 2013 at 20:34 UTC | |
by BrowserUk (Patriarch) on Aug 18, 2013 at 20:51 UTC | |
|
Re: PDL threading where/which instead of loop
by kevbot (Vicar) on Aug 19, 2013 at 03:54 UTC | |
by Anonymous Monk on Aug 19, 2013 at 14:43 UTC | |
by kevbot (Vicar) on Aug 20, 2013 at 04:51 UTC |