arrac has asked for the wisdom of the Perl Monks concerning the following question:
Also as I convert the list [1,2,3,4] to the piddle $u, can I get back a list (or a list of lists for a matrix) from $u?use PDL; my $u = pdl [1,2,3,4]; my $dim = 4; for(my $i=0; $i<$dim; $i++) { print $u->flat->index($i), "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to iterate through a PDL piddle?
by zentara (Cardinal) on Mar 10, 2011 at 14:31 UTC | |
by arrac (Initiate) on Mar 11, 2011 at 07:36 UTC | |
by etj (Priest) on May 26, 2022 at 14:44 UTC | |
by dkogan (Initiate) on Apr 22, 2011 at 07:47 UTC | |
by etj (Priest) on May 26, 2022 at 14:41 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |