"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/slice.t" between
PDL-2.075.tar.gz and PDL-2.076.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.075):slice.t  (PDL-2.076)
skipping to change at line 237 skipping to change at line 237
$y = $x->mslice(0.5); $y = $x->mslice(0.5);
ok(tapprox($y, 1), "mslice 1"); ok(tapprox($y, 1), "mslice 1");
$y = $x->mslice([0.5,2.11]); $y = $x->mslice([0.5,2.11]);
is("$y", "[1 1 1]", "mslice 2"); is("$y", "[1 1 1]", "mslice 2");
$x = zeroes(3,3); $x = zeroes(3,3);
$y = $x->splitdim(3,3); $y = $x->splitdim(3,3);
eval { $y->make_physdims }; eval { $y->make_physdims };
like($@, qr/splitdim:nthdim/, "make_physdim: Splitdim"); like($@, qr/splitdim:nthdim/, "make_physdim: Splitdim");
$y = $x->splitdim(-1,1);
is_deeply [$y->dims], [3,1,3], 'splitdims negative nthdim works' or diag explain
[$y->dims];
$y = $x->splitdim(1,1);
is_deeply [$y->dims], [3,1,3], 'splitdims works' or diag explain [$y->dims];
$y = $x->splitdim(1,2);
eval { $y->make_physdims };
like($@, qr/non-divisible/, "splitdims error non-divisible");
$x = sequence 5,5; $x = sequence 5,5;
$y = $x->diagonal(0,1); $y = $x->diagonal(0,1);
is("$y", "[0 6 12 18 24]", "diagonal"); is("$y", "[0 6 12 18 24]", "diagonal");
$x = sequence 10; $x = sequence 10;
eval { $y = $x->lags(1,1,1)->make_physdims }; eval { $y = $x->lags(1,1,1)->make_physdims };
like($@, qr/lags:\s*dim out of range/, "make_physdim: out of range"); like($@, qr/lags:\s*dim out of range/, "make_physdim: out of range");
eval { $y = $x->lags(0,-1,1)->make_physdims }; eval { $y = $x->lags(0,-1,1)->make_physdims };
 End of changes. 1 change blocks. 
0 lines changed or deleted 8 lines changed or added

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