hi, I have a nD pdl (in this case 3D), something like this : $z = zeros(5,5,3) $z(,,0) .= ones(5,5) $z(,,1) .= ones(5,5)+1 $z(,,2) .= ones(5,5)+2
$p1 = $z(,pdl(2,3),0) $p2 = $z(,pdl(4),1) $p3 = $z(,pdl(1,5),2) I remember I read somewhere I can extract all those elements in one go, but forgot what was it and how to use it... I want to do something along the lines : $sum = $z->dice( $p1,$p2,$p3)->transpose->sumover; my $idx = which($sum == 0); $sum->where($sum > 0) .= 1; .... etc... any idea... thanks
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
