"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Libtmp/ImageND/imagend.pd" between
PDL-2.076.tar.gz and PDL-2.077.tar.gz

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

imagend.pd  (PDL-2.076):imagend.pd  (PDL-2.077)
skipping to change at line 315 skipping to change at line 315
my($i,$y); my($i,$y);
foreach $i (0..$#odims) { foreach $i (0..$#odims) {
if ($i > $#idims) { # Just dummy extra dimensions if ($i > $#idims) { # Just dummy extra dimensions
$x = $x->dummy($i,$odims[$i]); $x = $x->dummy($i,$odims[$i]);
next; next;
# rebin_int can cope with all cases, but code # rebin_int can cope with all cases, but code
# 1->n and n->1 separately for speed # 1->n and n->1 separately for speed
} elsif ($odims[$i] != $idims[$i]) { # If something changes } elsif ($odims[$i] != $idims[$i]) { # If something changes
if (!($odims[$i] % $idims[$i])) { # Cells map 1 -> n if (!($odims[$i] % $idims[$i])) { # Cells map 1 -> n
my ($r) = $odims[$i]/$idims[$i]; my ($r) = $odims[$i]/$idims[$i];
$y = $x->mv($i,0)->dummy(0,$r)->clump(2); $y = $x->mv($i,0)->dupN($r);
} elsif (!($idims[$i] % $odims[$i])) { # Cells map n -> 1 } elsif (!($idims[$i] % $odims[$i])) { # Cells map n -> 1
my ($r) = $idims[$i]/$odims[$i]; my ($r) = $idims[$i]/$odims[$i];
$x = $x->mv($i,0); $x = $x->mv($i,0);
# -> copy so won\'t corrupt input PDL # -> copy so won\'t corrupt input PDL
$y = $x->slice("0:-1:$r")->copy; $y = $x->slice("0:-1:$r")->copy;
foreach (1..$r-1) { foreach (1..$r-1) {
$y += $x->slice("$_:-1:$r"); $y += $x->slice("$_:-1:$r");
} }
$y /= $r; $y /= $r;
} else { # Cells map n -> m } else { # Cells map n -> m
 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)