I would have to check, since I haven't used the complex code in donkey's years. 
 The current git should give the same answer as glue.  The constructor itself 
should do the Right thing - e.g. pdl(pdl(1),pdl(2*i)) - since it zero-pads 
short elements in its arg list.

(Mobile)


On Mar 9, 2013, at 10:38 AM, Luis Mochan <[email protected]> wrote:

>> Thanks for the report -- fixed in git.
> Thanks for fixing it so promptly!
> 
> I haven't tried the new git version, but I found a related bug and a 
> surprise: 
>    pdl> use PDL::Complex
>    pdl> p cat(pdl(1),pdl(2*i)) 
>    [1 2]
> I guess this is the same bug as before.
>    pdl> p cat(pdl(2*i), pdl(1))
>    [0 +2i  1 +1i]
> This may be suprising, as it might be expected that the real number
> pdl(1) gets complexified to 1+0*i, but actually, the threading machine adds a
> dummy dimension that converts pdl(1) to the vector [1,1] which is
> interpreted as 1+1i. The relation between complex numbers and size 2
> vectors has to be handled with care. What would the result of
> cat(pdl(1),pdl(2*i)) using the current git version? [1+1i,0+2i] or
> [1+0i,0,2i]? 
> 
> Best regards,
> Luis
> 
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> 

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

Reply via email to