Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a PDL that is 8 columns by 120 rows.
I want to simply SHIFT all the columns to the right by 1 and insert a column of 0's for the first column. I would prefer to DROP the last column so I don't change the dimensions.
I think I can do it by slicing and gluing into a new PDL, but was wondering if there was any faster function that would hel me do it. I would prefer to use "inplace" if possible to minimize memory.
Also, I am aware of the SHIFTRIGHT function, but that doesn't seem to be doing the job. I believe that is a binary shift function.
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to shift the columns of a PDL matrix
by lin0 (Curate) on Jul 03, 2007 at 22:35 UTC | |
by Anonymous Monk on Nov 04, 2016 at 09:42 UTC |
Back to
Seekers of Perl Wisdom