This is from a posting by Luis Mochon on the perldl mailing list
on some issues with the current PDL::Complex implementation and excerpted
I found an strange behavior in PDL::Complex.
(I'm running PDL v2.006 under perl5 (revision 5 version 16 subversion 1))
To illustrate this behavior, I declare a 1D complex array from a 2D real pdl:
pdl> $a=sequence(2,3)->cplx pdl> p $a [0 +1i 2 +3i 4 +5i] # Pdl allows me to transpose the array, as if it were an ordinary 2x3 pdl: pdl> p $a->transpose [ [0 2 4] [1 3 5] ] # but it doesn't realize that after transposition it is no longer a 1D # complex array pdl> p $a->transpose->info PDL::Complex: Double D [3,2]
Log in to post a comment.