This may be one bug against a larger classes of bugs where
topdl() should be
used more often for POLA.
I see the following behaviour if the
$indices argument is not a piddle:
use PDL; use Test::Most tests => 2; my $t = sequence(3,3); my $flatidx = 6; is( ref [ $t->one2nd(pdl($flatidx)) ]->, 'PDL', 'passing in $indices as a piddle works as expected' ); is( ref [ $t->one2nd($flatidx) ]->, 'PDL', 'passing in a perl scalar makes the first item in the list a simple Perl scalar (not an array of 1-element piddles)' ); done_testing;