"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Libtmp/Image2D/t/image2d.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).

image2d.t  (PDL-2.078):image2d.t  (PDL-2.079)
use strict; use strict;
use warnings; use warnings;
use Test::More; use Test::More;
use Test::Exception; use Test::Exception;
use PDL; use PDL;
use PDL::Image2D; use PDL::Image2D;
my $mask = pdl(
[[0,0,0,0,0],[0,0,1,1,0],[0,0,0,0,0],[0,0,1,1,0],[0,0,0,0,0]],
[[0,0,0,0,0],[0,1,0,1,0],[0,0,1,1,0],[0,0,0,0,0],[0,0,0,0,0]],
);
my $crops = pdl(indx,
[2,3,1,3],
[1,3,1,2],
);
my $got = crop($mask->slice(':,:,(1)'));
diag $got;
ok all($got == $crops->slice(':,(1)')), 'mask non-broadcast' or diag "got=$got";
$got = crop($mask);
ok all($got == $crops), 'mask broadcast' or diag "got=$got";
my $ans = pdl( my $ans = pdl(
[ 3, 7, 11, 21, 27, 33, 39, 45, 51, 27], [ 3, 7, 11, 21, 27, 33, 39, 45, 51, 27],
[ 3, 5, 13, 21, 27, 33, 39, 45, 51, 27], [ 3, 5, 13, 21, 27, 33, 39, 45, 51, 27],
[ 3, 9, 15, 21, 27, 33, 39, 45, 51, 27] [ 3, 9, 15, 21, 27, 33, 39, 45, 51, 27]
); );
my $x = xvals zeroes 10,3; my $x = xvals zeroes 10,3;
$x->setbadat(2,1); $x->setbadat(2,1);
my $y = pdl [1,2],[2,1]; my $y = pdl [1,2],[2,1];
 End of changes. 1 change blocks. 
0 lines changed or deleted 14 lines changed or added

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