reorder() is not listed as an Lvalue subroutine. See PDL::Lvalue for the list. It seems like it should be but I'm not sure enough of the implementation to determine if it will work as one. You could try adding it to the PDL::Lvalue list and see if it works.
--Chris On Tue, Mar 25, 2014 at 7:24 PM, vine xf <[email protected]> wrote: > Hi, > > I got an error message while using PDL(2.007, ActivePerl5.16), but don't > know > why. Here's a simplified example: > > everything's ok for this code: > use PDL; > $a = sequence(5,6); > $b = $a->reorder(1,0); > $b .=0; # $a is all zeros now. > > but this code doesn't work: > use PDL; > $a = sequence(5,6); > $a->reorder(1,0) .= 0; #Can't modify non-lvalue subroutine call at - line 3, > ... > > But methods like ->splice(...) could be assigned to without any problem. Is > there a subset of PDL method which can't be assigned to just like reorder()? > > Xiaofang. > > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
