I am considering the complex extension of the Perl Data Language (PDL 2.19.0) for complex matrix operations, but operations as easy as transpose do not work as I would expect.
use strict;
use warnings;
use PDL;
use PDL::Complex;
my $m = cplx pdl [i, 1], [-1, -i];
printf "m=%s\n", $m;
my $mt = $m->transpose;
printf "m=%s\n", $m;
printf "mt=%s\n", $mt;
my $mx = $m->xchg(1,2);
printf "m=%s\n", $m;
printf "mx=%s\n", $mx;
To me it seems that $m->transpose equals $m. Another supposedly easy operation which bugs me:
printf "m[0,0]=%s\n", $m->at(0,0);
does not work, only
printf "m[0,0,0]=%s\n", $m->at(0,0,0);
does. Am I using the API in a wrong way?