Hi,

I suspect (from the PDL::Complex manual page) :


    This module features a growing number of functions manipulating complex
    numbers. These are usually represented as a pair "[ real imag ]" or "[
    angle phase ]". If not explicitly mentioned, the functions can work
    inplace _____(not yet implemented!!!)______ and require rectangular
form.

Cheers,

--
Greg


2018-04-11 4:44 GMT+02:00 Luis Mochan <moc...@fis.unam.mx>:

> 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          | moc...@fis.unam.mx   /\_/\__/
> 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
> pdl-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-general
>
------------------------------------------------------------------------------
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
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to