This puts together the previous responses for your specific example: > #!/usr/bin/perl > # > use PDL; > use PDL::NiceSlice; > > print $a = sequence(5,7); > > $cols = pdl(0,1); # cols to be removed > $rows = pdl(2); # rows to be removed > > $cvals = sequence($a->dim(0)); # all cols indexes > $rvals = sequence($a->dim(1)); # all rows indexes > > $ckeep = setops($cols, 'XOR', $cvals); # cols to keep > $rkeep = setops($rows, 'XOR', $rvals); # rows to keep > > print $a = $a($ckeep,$rkeep); # dice both axes at once
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
