Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Ed .
Hi Ingo, That does sound like the right approach. Do you feel like making a PR with at least a sketch like “talk about complex numbers here” in the various places, for me to expand? Obviously, you’ll be welcome to also document it a bit more fully instead ;-) Best regards, Ed From: Ingo Schmi

Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Ed .
Sorry to have been unclear: I mean I added the “WARNING” in the documentation. The code does not give any warnings, and I’m not planning to add any, since "ci” will be going away soon. From: Luis Mochan Sent: 08 March 2021 15:50 To: pdl-general@lists.sourceforge.net

Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Ingo Schmid
Hi Ed, I think that the first point of reference for data types should PDL::Types, no? I see that it currently is not containing any discussion of the actual data types, though. Another option would be to add something to the top-level PDL pod, probably referring to other docs (which?). Specific

Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Luis Mochan
On Mon, Mar 08, 2021 at 03:28:09PM +, Ed . wrote: > Hi folks, > > I added the warning because I found the behaviour surprising when adding > tests. My plan now is that ci() will go away, so my proposal is to use it as > “ci()” for now, bearing in mind it’s only temporary. How does that sound?

Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Ed .
Hi folks, I added the warning because I found the behaviour surprising when adding tests. My plan now is that ci() will go away, so my proposal is to use it as “ci()” for now, bearing in mind it’s only temporary. How does that sound? Sorry about the API change. If we had a proper bit in the doc

Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Luis Mochan
Hi Ingo, On Mon, Mar 08, 2021 at 03:35:36PM +0100, Ingo Schmid wrote: > ... > Now, looking into PDL::Ops you will see this warning: > >  Returns the complex number 0 + 1i. > > B because this is not defined as a constant (with empty >  prototype), you must use it either as C<10*ci> or C. If you >

Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Ingo Schmid
Hi Luis, thank you for demonstrating. I remember now that for some reason ci required explicit parentheses. It is one of the PP mysteries, i.e., my lack of deep knowledge, I think. Now, looking into PDL::Ops you will see this warning:  Returns the complex number 0 + 1i. B because this is not d

Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Luis Mochan
Hi Ingo, On Mon, Mar 08, 2021 at 09:49:06AM +0100, Ingo Schmid wrote: > ... > is it not doing  ci() + $x (expected behaviour) rather than ci( +$x) ? No. For example: $ pdl2 ... pdl> $x=1+0*ci # initialize a complex variable with a real value pdl> p $x 1+0i pdl> p ci()+$x #

Re: [Pdl-general] [Pdl-devel] PDL 2.027 released

2021-03-08 Thread Ingo Schmid
Hi Luis, is it not doing  ci() + $x (expected behaviour) rather than ci( +$x) ? Ingo On 07.03.21 23:42, Luis Mochan wrote: Thus, ci+$x is interpreted as ci(+$x) which actually assigns complex i to each element of $x if $x is a complex pdl. If $x is real, then it assigns 0 (I guess it type-conv