"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/slice.t" between
PDL-2.078.tar.gz and PDL-2.079.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

slice.t  (PDL-2.078):slice.t  (PDL-2.079)
skipping to change at line 476 skipping to change at line 476
$c = PDL->pdl(7,6); $c = PDL->pdl(7,6);
$got = $pa->slice([$c->slice(1),0,0]); $got = $pa->slice([$c->slice(1),0,0]);
is "".$got, 6, 'slice did "at" automatically' or diag "got:$got"; is "".$got, 6, 'slice did "at" automatically' or diag "got:$got";
my $cmp = pdl(2,4,6); my $cmp = pdl(2,4,6);
my $rg = pdl(2,7,2); my $rg = pdl(2,7,2);
$got = $pa->slice([$rg->slice(0),$rg->slice(1),$rg->slice(2)]); $got = $pa->slice([$rg->slice(0),$rg->slice(1),$rg->slice(2)]);
ok all($got == $cmp), 'slice did "at"' or diag "got:$got"; ok all($got == $cmp), 'slice did "at"' or diag "got:$got";
$pa = zeroes(7, 7); $pa->set(3, 4, 1); $pa = zeroes(7, 7); $pa->set(3, 4, 1);
$indices = $pa->flat->which->dummy(0,$pa->getndims)->make_physical; $indices = $pa->which->dummy(0,$pa->getndims)->make_physical;
my $s = $indices->index(0); my $s = $indices->index(0);
$s %= 7; $s %= 7;
is $indices.'', <<EOF, 'mutate indexed slice affects only right column'; is $indices.'', <<EOF, 'mutate indexed slice affects only right column';
\n[\n [ 3 31]\n] \n[\n [ 3 31]\n]
EOF EOF
done_testing; done_testing;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)