I found a strange behavior for the addition assignment operator with
slices of complex pdl's. For example, when I add a complex number to
itself, it doubles up, as expected.
pdl> use PDL::Complex;
pdl> $a=1+2*i;
pdl> p $a
1 +2i
pdl> $a += $a
pdl> p $a
2 +4i
This is the correct behavior. Nevertheless, when I add a component of a
complex vector to itself, it doesn't work out:
pdl> $a=pdl([[1,2],[3,4]])->complex;
pdl> p $a
[1 +2i 3 +4i]
pdl> $a->(:,(0))+=$a->(:(0))
pdl> p $a
[1 +2i 3 +4i]
The first complex component of the 2D complex vector should have been doubled,
but it didn't change.
Best regards,
Luis
--
o
W. Luis Mochán, | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\
Apdo. Postal 48-3, 62251 | (*)/\/ \
Cuernavaca, Morelos, México | [email protected] /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general