It works for me in PDL-2.4.5:

perldl> $x = zeros(3,3)

perldl> $x(1,1) .=1

perldl> p $x

[
  [0 0 0]
  [0 1 0]
  [0 0 0]
]

perldl> $y = $x->transpose

perldl> $y .= $y->rotate(1)

perldl> p $x

[
  [0 0 0]
  [0 0 0]
  [0 1 0]
]

--Chris

Gabor Szabo wrote:
> On Wed, Nov 11, 2009 at 4:15 PM, David Mertens <[email protected]> wrote:
>> Matt meant to send this to the whole list.  If this isn't a really cool
>> example of data flow, I don't know what is:
>>
>> On Wed, Nov 11, 2009 at 8:07 AM, Matthew Kenworthy
>> <[email protected]> wrote:
>>> Gabor,
>>>
>>> If you want to drop one of the transpose, you could also do:
>>>
>>> $b = $a->transpose;
>>>
>>> $b .= $b->rotate(1);
>>>
>>> That will flow back the rotate into $a.
>>>
> 
> Hmm, it does not seem to work for me:
> 
> perldl> p $x
> 
> [
>  [0 0 0]
>  [0 1 0]
>  [0 0 0]
> ]
> 
> perldl> $y = $x->transpose;
> 
> perldl> $y .= $y->rotate(1);
> 
> perldl> p $x
> 
> [
>  [0 0 0]
>  [0 1 0]
>  [0 0 0]
> ]
> 
> perldl> p $y
> 
> [
>  [0 0 0]
>  [0 0 1]
>  [0 0 0]
> ]
> 
> 
> which is the same as
> 
> perldl>  p $x->rotate(1)
> [
>  [0 0 0]
>  [0 0 1]
>  [0 0 0]
> ]
> 
> while I was expecting
> 
> perldl> p $x->transpose->rotate(1)->transpose
> 
> [
>  [0 0 0]
>  [0 0 0]
>  [0 1 0]
> ]
> 
> 
> Gabor
> 
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> 
> 
> ------------------------------------------------------------------------
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.425 / Virus Database: 270.14.60/2496 - Release Date: 11/11/09 
> 07:40:00
> 


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to