"Fossies" - the Fresh Open Source Software Archive  

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

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

ops.t  (PDL-2.077):ops.t  (PDL-2.078)
skipping to change at line 143 skipping to change at line 143
{ {
# And and Or # And and Or
ok(all( approx(pdl(1,0,1) & pdl(1,1,0), pdl(1,0,0))), 'elementwise and'); ok(all( approx(pdl(1,0,1) & pdl(1,1,0), pdl(1,0,0))), 'elementwise and');
ok(all( approx(pdl(1,0,1) | pdl(1,1,0), pdl(1,1,1))), 'elementwise or'); ok(all( approx(pdl(1,0,1) | pdl(1,1,0), pdl(1,1,1))), 'elementwise or');
} }
{ {
# atan2 # atan2
ok (all( approx(atan2(pdl(1,1), pdl(1,1)), ones(2) * atan2(1,1))), 'atan2'); ok (all( approx(atan2(pdl(1,1), pdl(1,1)), ones(2) * atan2(1,1))), 'atan2');
ok (all( approx(PDL::atan2(pdl(1,1), pdl(1,1)), ones(2) * PDL::atan2(1,1))), 'at an2');
} }
{ {
my $pa = sequence (3,4); my $pa = sequence (3,4);
my $pb = sequence (3,4) + 1; my $pb = sequence (3,4) + 1;
ok (all( approx($pa->or2($pb), $pa | $pb)), 'or2'); ok (all( approx($pa->or2($pb), $pa | $pb)), 'or2');
ok (all( approx($pa->and2($pb), $pa & $pb)), 'and2'); ok (all( approx($pa->and2($pb), $pa & $pb)), 'and2');
ok (all( approx($pb->minus($pa), $pb - $pa)), 'explicit minus call'); ok (all( approx($pb->minus($pa), $pb - $pa)), 'explicit minus call');
ok (all( approx($pb - $pa, ones(3,4))), 'pdl subtraction'); ok (all( approx($pb - $pa, ones(3,4))), 'pdl subtraction');
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

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