Well pointed-out!

This is an artifact of PDL’s design of exporting lots of stuff, and especially 
having random libraries load functions into the “PDL” namespace. PDL::Complex 
should be considered deprecated, though I haven’t put that in the docs yet.

When I was looking at the lu_backsub stuff, I also replaced various “xchg(0,1)” 
and “mv(0,1)” with “transpose”, because that’s just clearer (and it 
automatically inserts dummy dimensions already as needed). I was tempted to 
implement a correct PDL::Complex::transpose, but quailed at the thought of the 
breakage that would cause for all the people who have code that expects the 
current behaviour. My direction of travel is that PDL::Complex will continue to 
behave as it does now, but users are recommended to write new code using 
native-complex.

Best regards,
Ed

From: Luis Mochan<mailto:moc...@icf.unam.mx>
Sent: 01 June 2021 01:49
To: pdl-devel@lists.sourceforge.net<mailto:pdl-devel@lists.sourceforge.net>; 
perldl<mailto:pdl-gene...@lists.sourceforge.net>
Subject: Re: [Pdl-devel] PDL 2.049 released

One detail to be aware of:

    pdl> p i()->info
    PDL: CDouble D []
    pdl> use PDL::Complex
    pdl> p i()->info
    PDL::Complex: Double D [2]

Thus, the function i() is modified when loading PDL::Complex!

Regards,
Luis



On Mon, May 31, 2021 at 11:20:47PM +0000, Ed . wrote:
> Dear PDL folks,
>
> PDL 2.049 has just been released. Notable changes:
>
> Matrix stuff:
> - MatrixOps::identity now preserves higher dims on multi-dim input
> - MatrixOps::lu_decomp now preserves inplace flag on input
> - MatrixOps::lu_backsub now gets output dims right including inplace - thanks 
> @wlmb for report
>
> Complex numbers:
> - PDL::Complex->from_native / as_native
> - parse simple complex-number strings e.g. ‘[1+i 2-3i]’
> - replace PDL::Complex stringification with native-complex version
> - PDL::r2C able to take Perl scalars
> - add PDL::i2C
> - replace creal, cimag with re, im, for easier PDL::Complex -> native 
> transition
> - change default r2C and i2C input types to D from F
> - add czip($re, $im) -> native complex
> - i() as function (not constant) like nan()
> - ci() removed
> - add abs2
> - pdl([native-complex]) now creates a native-complex ndarray
> - sumover/prodover now also process native complex
> - comparing PDL::Complex and native complex other than for equality now a 
> fatal error, can == with real
> - PDL::Complex slices that affect 0-th dim get re-blessed as PDL
> - PDL::Complex can assign real values and threading won't also assign to imag
> - PDL::Constants only loads PDL::Complex on demand
>
> General stuff:
> - copy now copies ndarray and leaves original ndarray's inplace alone
> - SvPDLV gives more comprehensible error if given a hash without "PDL" key
> - Inline now not a dep but if installed gets updated to suitable version
> - new pdlperl.h for Perl-specific functions/macros
> - $PDL::undefval can be ndarray
> - overloading now done in PDL::Ops/Primitive where functions defined
> - overloading honours subclass methods
>
> As usual, please give it a try and report problems.
>
> Best regards,
> Ed


> _______________________________________________
> pdl-devel mailing list
> pdl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-devel


--

                                                                  o
W. Luis Mochán,                      | tel:(52)(777)329-1734     /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388     `>/   /\
Av. Universidad s/n CP 62210         |                           (*)/\/  \
Cuernavaca, Morelos, México          | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB


_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to