[Pdl-devel] FastRaw

2025-09-05 Thread Luis Mochan
Hi, I just found a mistake in one of my programs which reveals what I guess is an error in the PDL::IO::FastRaw. $ pdl ... pdl> # create a small ndarray and map it to disk pdl> use PDL::IO::FastRaw; pdl> $a=mapfraw("rem.dat", {Datatype=>cdouble, Dims=>[10], Creat=>1}); pdl>

Re: [Pdl-devel] magnover

2025-07-28 Thread Luis Mochan
adcasting, since > comparison of multi-element ndarrays is forbidden. That may not be a problem > for your application. You are right, but in my case magnover produced a scalar. Regards, Luis > > Best regards, > Ed > ____ > From: Jörg Sommrey vi

Re: [Pdl-devel] magnover

2025-07-24 Thread Luis Mochan
nfo for byte, long, float, double; > > PDL: Double D [] > PDL: Float D [] > PDL: Float D [] > PDL: Float D [] > PDL: Double D [] > > Regards, > -jo > > > On Thu 24 Jul 2025 06:36:39 PM CEST, Luis Mochan wrote: > > > On Wed, Jul 23, 2025 at 11:56:00AM

Re: [Pdl-devel] magnover

2025-07-24 Thread Luis Mochan
lag gets set on empty magnover"; > is_pdl +(sequence(4)+i())->magnover, double(4.242640), 'magnover correct for > complex'; > > Best regards, > -jo > > > On Wed 23 Jul 2025 04:52:24 AM CEST, Luis Mochan wrote: > > > Hello, > > > > In so

[Pdl-devel] magnover

2025-07-22 Thread Luis Mochan
Hello, In some of my programs I used the code such as $abs=$cvec->abs2->sumover->sqrt; to get the magnitude of a vector $cvec. I just replaced it to the cleaner $abs=$cvec->magnover; But then my program failed when I made the comparison if($abs > 0){...} with the message Can'

Re: [Pdl-devel] conditional inline

2025-01-30 Thread Luis Mochan
Hi Ed, Was this the official announcement of PDL2.099? On Fri, Jan 24, 2025 at 12:17:05AM +, Ed . wrote: > That does look more simple! PDL 2.099 is out now with the ND_both functions, > announcement to follow soon. Luis, I moved csqrt* to PDL::Math, as I felt the > other c* functions sat th

Re: [Pdl-devel] pdl scripts

2025-01-22 Thread Luis Mochan
On Wed, Jan 22, 2025 at 04:18:41PM +, Ed . wrote: > Hi Luis, > > I agree that in a sense, the system was buggy (albeit only misleading rather > than actually operating wrongly), which is why I fixed it and that will be > reflected in the next version. Great! > In the meantime, there is the

Re: [Pdl-devel] pdl scripts

2025-01-22 Thread Luis Mochan
explained above) when first tried. Regards, Luis On Wed, Jan 22, 2025 at 02:30:01PM +, Jörg Sommrey wrote: > Hi Luis, > > you might try 'pdl2' instead of 'pdl'. The latter doesn't work for me > neither after upgrading PDL lately. > Just a guess. > >

Re: [Pdl-devel] pdl scripts

2025-01-22 Thread Luis Mochan
Hi Ed, On Wed, Jan 22, 2025 at 02:50:41PM +, Ed . wrote: > Hi Luis, > > The suggestion I made in my first reply: "cpanm can be told to install > recommended modules" is the one I am still making. I understand. My worry is about the new users. They may just turn away if they believe the syste

Re: [Pdl-devel] pdl scripts

2025-01-21 Thread Luis Mochan
t very surprising), and wouldn't > want to use it without readline (which I have faced when debugging in a qemu > environment on a weird architecture). I am not going to make any of the > Term::* be "required" for PDL. I hope you understand. > > If it helps, the REPL sc

Re: [Pdl-devel] pdl scripts

2025-01-21 Thread Luis Mochan
Hi Ed, On Tue, Jan 21, 2025 at 05:13:09PM +, Ed . wrote: > Hi Luis, > > That's a really good question! > > PDL's "requirements" (when you say e.g. cpanm PDL) are hard requirements for > PDL to run: largely File::Map and File::Which. CPAN has a mechanism to > "recommend" other modules, includ

[Pdl-devel] pdl scripts

2025-01-20 Thread Luis Mochan
Hello, I started teaching about PDL to some students. The first step is building PDL. When I install PDL in my account in my old laptop, everything runs smoothly, but in order to be illustrative I made a new account for myself and built it there under a perlbrew installation. It was nice that the

Re: [Pdl-devel] Pdlpp modules

2025-01-13 Thread Luis Mochan
Hi Ed, On Mon, Jan 13, 2025 at 07:05:38PM +, Ed . wrote: > Glad to hear! By the way, if it's only for the sake of that one function, > would you like to add it to PDL::Ops, ideally called sqrt_upper, and with the > Pars typespec of !real and complex-only datatypes? If you'd like to PR that,

Re: [Pdl-devel] Pdlpp modules

2025-01-11 Thread Luis Mochan
to make a D-dimensional Fourier transform of a rank 3 tensor field, represented by a (D+3)-dimensional ndarray, one would have to move the first three dimensions (the tesorial indices) to the end, perform the D-dimensional Fourier transform over the first D indices and then bring the tensorial indices

Re: [Pdl-devel] Pdlpp modules

2025-01-11 Thread Luis Mochan
On Sat, Jan 11, 2025 at 11:52:53AM -0600, Luis Mochan wrote: > I didn't know (or had forgotten) about the pptemplate; I'll try it, thanks. > ... With pptemplate things worked and installed without problem, thank

Re: [Pdl-devel] Pdlpp modules

2025-01-11 Thread Luis Mochan
> Best regards, > Ed > > > From: Luis Mochan > Sent: 11 January 2025 03:16 > To: perldl ; perldl > > Subject: [Pdl-devel] Pdlpp modules > > > Hi, > > I started experimenting with installing distributions that use > Inline:

[Pdl-devel] Pdlpp modules

2025-01-10 Thread Luis Mochan
Hi, I started experimenting with installing distributions that use Inline::Pdlpp code and Inline::Module. Following a mixture of instructions I found in the documentation of Inline::Module, Inline::Module::Tutorial and Inline::Pdlpp I had success running under Perl-5.36.0, i.e., I could use the

Re: [Pdl-devel] curl of vector

2025-01-10 Thread Luis Mochan
Hi Ed, all, On Tue, Jan 07, 2025 at 08:16:56PM +, Ed . wrote: > Hi Luis and all, > > Two points: > > ... > I've now added a Ufunc::diffcentred (based on Luis's rotate algorithm), and Ufunc::partial; Great! > the latter adjusts Luis's work to take an ndarray as first param so it can be > a m

Re: [Pdl-devel] empty slices

2024-12-09 Thread Luis Mochan
mpty, so > you got one. These, and the slice scenario, are not similar situations. > > Best regards, > Ed > > > From: Luis Mochan > Sent: 10 December 2024 2:08 AM > To: perldl ; perldl > > Subject: [Pdl-devel] empty slices > > H

[Pdl-devel] empty slices

2024-12-09 Thread Luis Mochan
Hello, I wonder if the following behavior is the expected behavior: pdl> $x=sequence(2) pdl> p $x(0:-1) [0 1] pdl> p $x(1:-1) [1] pdl> p $x(2:-1) Stringizing problem: Error in slice:slice starts out of bounds in pos 0 (start is 2; end is -1; inc is 0; sourc

[Pdl-devel] approx fails for complex types

2024-12-08 Thread Luis Mochan
Hi All, I found a mysterious error when comparing complex types. For instance, pdl> p approx(i,5*i) 1 pdl> p approx(5*i,i) 0 i.e., i is close to 5i (wrong) but 5i is not close to i (correct). I found a (provisional?) fix, by simply using parenthesis around PDL_IF_GENTYPE_RE

Re: [Pdl-devel] cgtsv

2024-12-05 Thread Luis Mochan
Hi Ed, On Thu, Dec 05, 2024 at 07:15:39AM +, Ed . wrote: > If an input parameter gets modified, it absolutely needs to be > marked [io]. Please could you open an issue on the repo noting at > least that operation, and any others you spot that have the same > problem? Sorry for missing that he

[Pdl-devel] cgtsv

2024-12-04 Thread Luis Mochan
Hi, I use the routine PDL::LinearAlgebra::Complex::cgtsv to solve systems of linear equations described by a tridiagonal matrix. The arguments are the sub-diagonal, the diagonal, the supradiagonal and the right hand side of the equations. I found one of my programs has a misterious error, as i

Re: [Pdl-devel] curl of vector

2024-11-21 Thread Luis Mochan
On Thu, Nov 21, 2024 at 03:09:37PM +, Ed . wrote: > Hi Luis, > > Thank you for both the code and the explanation! I was aware of the > limitations of diffover for this (including its name - just "diff" caused > clashes with Text::Diff in a downstream module). I'm proposing to rename > "diffo

Re: [Pdl-devel] curl of vector

2024-11-20 Thread Luis Mochan
Hi Boyd, About higher dimensions, if you have a vector field with coordinates V_i in D dimensions, you can build a matrix of derivatives M_ij= partial_i V_j where partial_j denotes the partial derivative with respect to the j-th coordinate. You can then take twice its antisymmetric part A_ij=pa

Re: [Pdl-devel] curl of vector

2024-11-20 Thread Luis Mochan
I see a problem with the use of diffover: at the boundary it takes no difference at all. (I also see a problem with the name, as it is not a reduction as the other 'over' methods). Thus, I would use diff2. Furthermore, both functions use a forward difference. One could conceive a backward differenc

Re: [Pdl-devel] naming conventions

2024-02-06 Thread Luis Mochan
On Tue, Jan 30, 2024 at 09:40:59PM -0600, Luis Mochan wrote: > ...> > On Mon, Jan 29, 2024 at 10:19:56PM -0500, David Mertens wrote: > > Hello Luis, > > > > Ever crafty, Perl gives you another way to solve this. You could put your > > functions under anot

Re: [Pdl-devel] RESEND: Change in xvals/yvals/zvals behavior

2024-01-30 Thread Luis Mochan
On Tue, Jan 30, 2024 at 04:25:40AM +, Ed . wrote: > Hi Diab, > > PDL 2.085 has just been released,... > ... Great! Regards, Luis -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Cienc

Re: [Pdl-devel] naming conventions

2024-01-30 Thread Luis Mochan
// '(no name)'; > print "Hello from $name\n"; > } > > package alpha; > > sub beta_speak { > my $self = shift; > print "Beta speak alpha!\n"; > $self->hello; > } > > package main; > > my $thing = foo->new(name => 'elg

Re: [Pdl-devel] naming conventions

2024-01-28 Thread Luis Mochan
(@args_as_normal). This is tested in > t/subclass.t and ought to work, including that any operations’ results will > also be in that subclass. If you try it and find any surprises, please say so > on here! Then I can capture that into t/subclass.t and fix it. > > Best regards, > E

[Pdl-devel] naming conventions

2024-01-28 Thread Luis Mochan
Hi, It is sometimes convenient to call my own functions that operate on ndarrays using the object notation: $ndarray->somefunction. A simple way to do it is to define the function within the PDL name space as in sub PDL::somefunction($self,...){...} Is there a better way? Adding functions to a p

[Pdl-devel] strange bug in gnuplot

2023-06-01 Thread Luis Mochan
I have a strange bug in PDL::Graphics::Gnuplot. Consider the following program: use PDL; use PDL::Graphics::Gnuplot; use IO::Prompter; $title="A title with many useless letters"; gplot({title=>$title}, with=>"lines", zeroes(20)->xvals**2); prompt -void, -single, "Ready?";

Re: [Pdl-devel] PDL 2.082 released

2023-03-23 Thread Luis Mochan
Congrats and thanks! On Thu, Mar 23, 2023 at 03:31:22AM +, Ed . wrote: > Dear PDL folks, > > PDL 2.082 has just been released... -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencia

Re: [Pdl-devel] inconsistent determinant

2023-02-14 Thread Luis Mochan
;undef}); > say "Got det=$det (Ref=@{[ref $det]}) lu=(@{$opt->{lu}}) for Matrix=$_"; > } > > I will look in a while at why the lu_decomp is behaving differently for the > two matrices. It is almost certainly a bug. > > Best regards, > Ed > > From: Luis

[Pdl-devel] inconsistent determinant

2023-02-10 Thread Luis Mochan
I found a curious situation when running pdl, as illustrated in the following example. I build two singular 3x3 matrices and calculate their determinant, which is zero. However, in one case I get a PDL scalar and in the other I get a Perl scalar. I don't know why the different behaviour: # Progra

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-22 Thread Luis Mochan
Hi, On Mon, Aug 22, 2022 at 01:33:45PM +, Ed . wrote: > Hi Luis, > > Glad to hear it! Could you share the code you’ve used? It might make a great > demo to add to P:G:Gnuplot. The following code plots two opaque vertical bars, a black one on the left and a red one on the right. On top of tha

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-21 Thread Luis Mochan
Sorry for the noise, it seems I've got it working now. Regards, Luis On Sun, Aug 21, 2022 at 08:23:51PM -0500, Luis Mochan wrote: > Hi, > I have used PDL::Graphics::Gnuplot to display the electric field > resulting from a calculation for some system. I would like to overlay >

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-21 Thread Luis Mochan
Hi, I have used PDL::Graphics::Gnuplot to display the electric field resulting from a calculation for some system. I would like to overlay the image of the system over the field. I tried to use the 'png transparent' terminal and made the plots {with=>'rgbalpha'} to have an alpha channel, but it did

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-21 Thread Luis Mochan
Hi Ed, On Sun, Aug 21, 2022 at 05:52:11PM +, Ed . wrote: > Hi Luis, > > The init_vars doesn’t do... > I’ve now merged it to the main branch, thank you! Could you pull it and make > sure it works as you expect with your code, so you can at least not rely on a > local modification? It seems

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-15 Thread Luis Mochan
ou have, and add the > test code as a comment on the PR? (I’m happy to bend it into the .t) > > Best regards, > Ed > > From: Luis Mochan<mailto:moc...@icf.unam.mx> > Sent: 15 August 2022 20:23 > To: Ed .<mailto:ej...@hotmail.com> > Cc: perldl<

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-15 Thread Luis Mochan
the pp_def of conv2d, around line > 266? > > Please let us know if that works (you’d need to do a “make install”, or else > a “make basic” then “perl -Mblib yourlocalscript.pl”). If it does, feel like > PR-ing an update for all the Image* modules in Libtmp? :-) > > Best

[Pdl-devel] conv2d

2022-08-15 Thread Luis Mochan
Hello, I tried to use conv2d from PDL::Image2D to make a simple average, as in $z->conv2d(ones(3,3))/9; to take the arithmetic average a pixel with its neareast neighbors. However, what I want to average is a component of an electric field which is complex valued. It turns out that conv2d doesn

Re: [Pdl-devel] meigen sort criteria for eigenvalue and eigenvectors.

2022-07-05 Thread Luis Mochan
Dear Guillermo, I guess the eigenvectors are the rows, not the columns, and they are normalized! Regards, Luis On Tue, Jul 05, 2022 at 03:05:16PM -0300, Guillermo P. Ortiz wrote: > Dear PDL developers, > > Trying to use meigen() for eigenvalue problem with matrix 4x4 without > threading for now,

Re: [Pdl-devel] benchmarks

2021-10-03 Thread Luis Mochan
and environment variable, perl+pdl+pp_def can be made faster than c. On Sat, Oct 02, 2021 at 07:03:50PM -0500, Luis Mochan wrote: > I made my own version of the ray-tracing program (as I tried to > understand it). I didn't use pp_def, only Per

Re: [Pdl-devel] benchmarks

2021-10-02 Thread Luis Mochan
.@hotmail.com>> wrote: > The pull request now also shows my attempt with a PP function. It’s about > twice as slow as pure-Perl (rather than 70 times with the naïve version). The > way this would benefit performance-wise would be to trace rays through many > more surfaces

[Pdl-devel] benchmarks

2021-09-27 Thread Luis Mochan
Hi all, I read today in a Raku newsletter about a floating point benchmark of several languages. https://www.fourmilab.ch/scanalyzer/archives/2021/09/floating-point-benchmark-raku-perl-6-language-added.html Taking C=1 as a reference, Julia=1.5, Python=2.6-30, Perl=23, Raku=205-735, Mathemati

Re: [Pdl-devel] native complex and PDL::LinearAlgebra

2021-09-27 Thread Luis Mochan
On Mon, Sep 27, 2021 at 02:07:49PM +, Ed . wrote: > ...If you can PR on PDL::LA with failing tests and maybe also fixes, > that would be incredibly helpful! I'll try asap. -- o W. Luis Mochán, | tel:(52)(

Re: [Pdl-devel] native complex and PDL::LinearAlgebra

2021-09-26 Thread Luis Mochan
t differently on complex than on real numbers, but treat PDL's as real and only PDL::Complex's as complex. Regards, Luis On Sat, Sep 25, 2021 at 06:51:48PM +, Ed . wrote: > Thank you. Now merged your change (thanks for adding tests too) and released > 0.23. > > From: Lu

Re: [Pdl-devel] native complex and PDL::LinearAlgebra

2021-09-25 Thread Luis Mochan
On Sat, Sep 25, 2021 at 03:33:29PM +, Ed . wrote: > Hi Luis, > > I’ll take a look shortly (in the final stages of getting the multi-C to > work). Can you confirm whether this worked according to your expectation in > 2.057? This failed in 2.057. Best regards, Luis >

[Pdl-devel] native complex and PDL::LinearAlgebra

2021-09-25 Thread Luis Mochan
Hi, Congrats on the new release. I found an error in PDL::LinearAlgebra. pdl> use PDL::LinearAlgebra pdl> $a=(1+sequence(2,2))*i() pdl> p $a [ [ i 2i] [3i 4i] ] pdl> p $a->mdet 0# instead of 2 I believe the problem lies in the code that distinguishes w

[Pdl-devel] sequence

2021-08-31 Thread Luis Mochan
Hi, I just discovered a mistake in one of my codes as I misunderstood the behavior of 'sequence': pdl> p sequence 5 [0 1 2 3 4] pdl> p sequence pdl 5 0 pdl> p sequence zeroes(5) [0 1 2 3 4] pdl> p sequence(2,3) [ [0 1] [2 3] [4 5] ]

[Pdl-devel] [moc...@icf.unam.mx: Re: P::G::Gnuplot 2.017]

2021-08-11 Thread Luis Mochan
- Forwarded message from Luis Mochan - Date: Wed, 11 Aug 2021 10:01:38 -0500 From: Luis Mochan To: "Ed ." Subject: Re: [Pdl-devel] P::G::Gnuplot 2.017 Hi, On Wed, Aug 11, 2021 at 05:32:25AM +, Ed . wrote: > Hi Luis, > > It will really help if you can give w

[Pdl-devel] P::G::Gnuplot 2.017

2021-08-10 Thread Luis Mochan
Hi, I'm having some trouble with PDL::Graphics::Gnuplot, which is behaving strangely lately. Consider: mochan@yapaque:~$ pdl perlDL shell v1.357 ... pdl> use PDL::Graphics::Gnuplot pdl> $x=zeroes(50)->xlinvals(0, 7) pdl> $w=gpwin("pdfcairo", output=>"rem.pdf");

[Pdl-devel] [moc...@icf.unam.mx: Re: [Pdl-general] lu_backsub]

2021-06-11 Thread Luis Mochan
Hi Ed, On Fri, Jun 11, 2021 at 06:30:51PM +, Ed . wrote: > Hi Luis, > > Thank you for the kind words! I think your points are of course valid. > However, I’m hoping you can help me understand your expectations a bit > better, so the tests, and then the code (and maybe the docs!), can be mad

Re: [Pdl-devel] PDL 2.049 released

2021-05-31 Thread Luis Mochan
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 +, Ed . wrote: > Dear PDL folk

Re: [Pdl-devel] PDL 2.049 released

2021-05-31 Thread Luis Mochan
Congrats! Luis On Mon, May 31, 2021 at 11:20:47PM +, 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 > - Ma

[Pdl-devel] lu_backsub

2021-05-29 Thread Luis Mochan
I found a strange behavior in lu_backsub from PDL::MatrixOps: pdl> my $M=pdl([1,2],[3,4]); pdl> my $M1=pdl([3,4],[1,2]); # interchange two rows pdl> my $y=pdl(1,1); pdl> my $x=lu_backsub($M->copy->lu_decomp, $y); pdl> my $x1=lu_backsub($M1->copy->lu_decomp, $y); pdl> p $x->

Re: [Pdl-devel] PDL 2.037 released

2021-04-16 Thread Luis Mochan
Thanks! This is great news! Regards, Luis On Fri, Apr 16, 2021 at 06:07:40PM +, Ed . wrote: > Dear PDL folks, > > PDL 2.037 has just been uploaded to CPAN. Key features since the last > announcement: > > * New type qualifiers for pp_def Pars: “real” and “complex”, motivated by > PDL::FF

[Pdl-devel] complex numbers

2021-04-03 Thread Luis Mochan
Trying to find out how safe is it to mix different types of complex numbers (for migration purposes), I tried: pdl> use PDL::Complex pdl> print i*ci() 0+0i +0+1ii So, I guess not surprisingly, that they are not. I don't know if these mixed operations should be forbidden (I guess it wo

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

2021-03-29 Thread Luis Mochan
> >> In a similar vein: is it really useful to call creal/cimag on real data? > >> It seems to me that too should throw an exception. > > I think it should just return the input and 0, respectively. Thus it can be > > used to write generic code that accepts real and complex input. carg should >

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

2021-03-25 Thread Luis Mochan
I started playing with the new complex numbers. I find it nice and useful that creal and cimag can be applied to real pdl's, but the results are promoted to complex: pdl> $x=pdl(1) pdl> p $x 1 pdl> p $x->creal 1+0i pdl> p $x->cimag 0+0i Equality and inequality comparisons do work but they also re

Re: [Pdl-devel] data flow, conversion & dimensions in complex numbers

2021-03-08 Thread Luis Mochan
Hi Ingo and all, On Mon, Mar 08, 2021 at 09:07:11PM +0100, Ingo Schmid wrote: > ... > The native way treats complex numbers as scalars of native complex > types. This solves the dimensions issue, obviously. I think it is a good idea not having access explicitly to an additional index at the begin

Re: [Pdl-devel] PDL 2.027 released

2021-03-07 Thread Luis Mochan
Hi Ed, > ...However, are you seeing a use for it that adds anything to simply using > i2C from PDL::Complex? No. Best regards, Luis -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Cienci

Re: [Pdl-devel] PDL 2.027 released

2021-03-07 Thread Luis Mochan
Hello, I'm intrigued by ci. What is the reason for its behavior? I found that ci was defined through pp_def with one output argument. 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 ty

Re: [Pdl-devel] PDL 2.027 released

2021-03-07 Thread Luis Mochan
Hi Ed, > The problem you identified is due to a logic error in the bifuncs in P::Ops – > they weren’t handling complex inputs correctly because the code to do so was > behind a check for unsigned-handling. Now that’s corrected, and there’s a > test to guard against regressions. As soon as the

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Luis Mochan
imaginary parts of a new complex? (I understand it may go against their philosophy) pdl> $a=1+2*ci #make a new complex pdl> p $a 1+2i pdl> $b=$a->cimag pdl> p $b 2 pdl> $b.=3 # modifying $b pdl> p $a # doesn't modify the imaginary part of $a 1+2i Best regards, Luis On

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Luis Mochan
And pow also works. So it seems the problem is related to the translation from the binary operator version '**'. pdl> p +(1+ci)->ipow(2) 0+2i pdl> p +(1+ci)->pow(2) 1.2246467991473532e-16+2i pdl> p +(1+ci)**2 1+0i pdl> On Sat, Mar 06, 2021 at 05:03:49PM -0600, Luis

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Luis Mochan
> So powers of complex numbers are not working. I haven't looked yet at > the P::Ops code. I'll try later. ipow does work though. -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencias F

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Luis Mochan
Hi, On Sat, Mar 06, 2021 at 07:41:18PM +, Ed . wrote: > Dear PDL folks, > I have just uploaded PDL 2.027. Changes from 2.026: Great! I want to start using the new complex code, mostly to avoid the errors due to bad uses of the extra (real-imag) dimension. > - native support for complex num

Re: [Pdl-devel] PDL 2.026_04 released - please try it out

2021-03-05 Thread Luis Mochan
On Fri, Mar 05, 2021 at 05:24:25PM +, Ed . wrote: > > > Whenever you switch lib (or > > > indeed Perl version), you’d need to re-run a build, because your Perl > > > is now different. > > But I didn't change the perl version, only the PDL version. I was in > > the process of rebuilding/testing/

Re: [Pdl-devel] PDL 2.026_04 released - please try it out

2021-03-05 Thread Luis Mochan
Hi Ed, thanks! On Fri, Mar 05, 2021 at 04:47:55PM +, Ed . wrote: > Hi Luis, > > As a generality I’d start by closely reading the error messages you see. Part of the problem is that I didn't get any informative error. :( > You haven’t said which tests started failing, so I assume it’s a > lib

Re: [Pdl-devel] PDL 2.026_04 released - please try it out

2021-03-05 Thread Luis Mochan
Hi, On Tue, Mar 02, 2021 at 02:38:41PM +, Ed . wrote: > Dear PDL folks, > > I have uploaded PDL 2.026_04. > ... I'm testing my codes with this version and they seem to work so far. I did have a problem at first: I used perlbrew to install perl-5.32.1, and into it I installed PDL 2.026 and as

Re: [Pdl-devel] PDL 2.026 released to CPAN

2021-02-21 Thread Luis Mochan
On Sun, Feb 21, 2021 at 08:19:39AM -0600, Luis Mochan wrote: > On Sun, Feb 21, 2021 at 09:56:43AM +, Ed . wrote: > > Thanks for the report! (I’m hoping the new 0.07 still works with the > > main-released 2.026 as well) > > I just tried it, PERL 2.3

Re: [Pdl-devel] PDL 2.026 released to CPAN

2021-02-21 Thread Luis Mochan
On Sun, Feb 21, 2021 at 09:56:43AM +, Ed . wrote: > Thanks for the report! (I’m hoping the new 0.07 still works with the > main-released 2.026 as well) I just tried it, PERL 2.32.1, PDL 2.0026 and FFTW3 0.07. It PASSed its tests and it seems to work. Regards, Luis --

Re: [Pdl-devel] PDL 2.026 released to CPAN

2021-02-20 Thread Luis Mochan
On Sun, Feb 21, 2021 at 12:22:22AM +, Ed . wrote: > It was because PDL::FFTW3 had pp_def params called “complex” which clashed > with complex.h. I’ve changed them and released 0.07 which cleverly renames > those params to “complexv”. Please give that a go! It seems to work OK now, with 026_0

Re: [Pdl-devel] PDL 2.026 released to CPAN

2021-02-20 Thread Luis Mochan
Hi Ed, On Sun, Feb 21, 2021 at 12:22:22AM +, Ed . wrote: > It was because PDL::FFTW3 had pp_def params called “complex” which clashed > with complex.h. I’ve changed them and released 0.07 which cleverly renames > those params to “complexv”. Please give that a go! Thanks, will try it. > By

Re: [Pdl-devel] PDL 2.026 released to CPAN

2021-02-20 Thread Luis Mochan
It seems that PDL::FFTW3 installs with no problemas using PDL 2.026 and perl 5.28.0, so the problem might have to do with the upgrade to perl 5.32.0. Regards, Luis On Sat, Feb 20, 2021 at 02:52:37PM -0600, Luis Mochan wrote: > Hi, > I tried to install PDL::FFTW3 using the new PDL 2.026 an

Re: [Pdl-devel] PDL 2.026 released to CPAN

2021-02-20 Thread Luis Mochan
Hi, I tried to install PDL::FFTW3 using the new PDL 2.026 and perl 5.32.1 under perlbrew, with no success. I don't know if it's perl or PDL or fftw3... or myself. I attach the results of make. Thanks and regards, Luis On Mon, Feb 15, 2021 at 10:47:34PM -0600, Luis Mochan wrote: >

Re: [Pdl-devel] PDL 2.026_01 released to CPAN

2021-02-20 Thread Luis Mochan
Hi Ed, On Sat, Feb 20, 2021 at 03:12:44PM +, Ed . wrote: > Hi Luis, > > If you take a look at > https://metacpan.org/pod/release/ETJ/PDL-2.026_01/GENERATED/PDL/Ops.pm#ci > you’ll see there’s now... Thanks for the pointers and the explanations! Regards, Luis --

Re: [Pdl-devel] PDL 2.026_01 released to CPAN

2021-02-20 Thread Luis Mochan
t; > Best > > Ingo > On 2/20/2021 2:20 AM, Ed . wrote: > For sqrt with real numbers, there's already multiple possible answers! So > this is not adding any additional problems. > > For log, it’s probably most pragmatic to have an additional function, which > already e

Re: [Pdl-devel] PDL 2.026_01 released to CPAN

2021-02-19 Thread Luis Mochan
gt; sqrt point? (A PR to add a failing test would be even better, and a PR with a > failing test plus code to fix the problem would be better again 😊) > > Best regards, > Ed > > From: Luis Mochan<mailto:moc...@icf.unam.mx> > Sent: 20 February 2021 00:09 >

Re: [Pdl-devel] PDL 2.026_01 released to CPAN

2021-02-19 Thread Luis Mochan
x pdl> p sqrt(-1) Runtime error: Can't take sqrt of -1 at (eval 416) line 5. pdl> p sqrt(-1+0*i) 0 +1i pdl> Is this the expected behavior? Regards, Luis On Fri, Feb 19, 2021 at 05:52:44PM -0600, Luis Mochan wrote: > This is good news! > Thanks! > Luis > > On Fri

Re: [Pdl-devel] PDL 2.026_01 released to CPAN

2021-02-19 Thread Luis Mochan
This is good news! Thanks! Luis On Fri, Feb 19, 2021 at 08:15:59PM +, Ed . wrote: > Dear PDL users, > > I’ve just uploaded PDL 2.026_01 to CPAN. It has Ingo Schmid’s “native complex > types” code (as tidied up a bit). Please give it a go and report whether it > works! Please note that now e.

Re: [Pdl-devel] PDL 2.026 released to CPAN

2021-02-15 Thread Luis Mochan
Just intalled PDL 2-026 using perlbrew/cpanm under perl 5.32.1. Haven't tested it yet, but it didn't complain. Regards, Luis -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencias Físicas

Re: [Pdl-devel] PDL 2.026 released to CPAN

2021-02-15 Thread Luis Mochan
Thanks for the announcement and for all the work! Luis On Mon, Feb 15, 2021 at 04:01:05PM -0700, Derek Lamb wrote: > Dear PDL users, > > Ed recently released PDL 2.026 to CPAN. (https://metacpan.org/release/PDL) > > There are several notable changes since the last announcement to this email > l

Re: [Pdl-devel] PDL 2.020 released

2019-12-11 Thread Luis Mochan
Very good news! Thanks! On Thu, Dec 12, 2019 at 04:00:51AM +, Ed . wrote: > Dear PDL folks, > > I have just released PDL 2.020 onto CPAN. Major changes: > > - PDL::PP and associated modules now put lots of #line directives into > generated .xs files, so it’s possible to understand where in

Re: [Pdl-devel] pdl complex support mostly ready

2019-05-21 Thread Luis Mochan
Dear Ingo, On Wed, May 22, 2019 at 02:15:24AM +0200, Albrecht Ingo Schmid wrote: > Dear all, > > I've been working on native complex number support and got it to the > stage of passing all tests on my linux box. Each element of a piddle is > a complex number, no more hassle whether the first dime

[Pdl-devel] complex arrays

2019-05-08 Thread Luis Mochan
I found this night a curious behavior when creating pdl's from arrays of complex pdl's. If the array has a single element, the created pdl is complex, but if the array has more than one element, the result is a real pdl. I was aware of the later behavior, and so was surprised by the limit case of o

Re: [Pdl-devel] PDL/PDLA and Strawberry Perl PDL editions

2019-04-26 Thread Luis Mochan
on't fully understand the pros and cons of using the namespace PDLA instead of making a branch of PDL that becomes agile (without changing name) and that in some future replaces the current PDL. Best regards, Luis On Fri, Apr 26, 2019 at 03:46:23PM -0500, Luis Mochan wrote: > Failed my

Re: [Pdl-devel] PDL/PDLA and Strawberry Perl PDL editions

2019-04-26 Thread Luis Mochan
Regards, Luis On Fri, Apr 26, 2019 at 03:41:22PM -0500, Luis Mochan wrote: > Made my first attempt to use PDLA. > > PDLA::Rest doesn't install on the first try as > Alien::HDF4 doesn't install as > it can't find file common.pl during perl Makefile.PL, make, etc.

Re: [Pdl-devel] PDL/PDLA and Strawberry Perl PDL editions

2019-04-26 Thread Luis Mochan
Made my first attempt to use PDLA. PDLA::Rest doesn't install on the first try as Alien::HDF4 doesn't install as it can't find file common.pl during perl Makefile.PL, make, etc. A simple solution seems to be to replace 'common.pl' by './common.pl' everywhere. On Fri, Apr 26, 2019 at 01:58:07A

Re: [Pdl-devel] hidden type conversion

2019-04-25 Thread Luis Mochan
, 2019 at 06:39:52PM +, Ed . wrote: > Does the complex_atan2 branch need merging into legacy pdl/master and > bringing over to PDLA? > > -Original Message- > From: Luis Mochan > Sent: Thursday, April 25, 2019 7:38 PM > To: pdl-devel@lists.sourceforge.net > Subject

Re: [Pdl-devel] hidden type conversion

2019-04-25 Thread Luis Mochan
I made a similar discovery and asked on the pdl-general list on Jan. 18. The answer I got from Derek Lamb is that the issue has been corrected on the complex_atan2 branch in github. I recall there have been several other changes to PDL::Complex on that branch. Regards, Luis On Thu, Apr 25, 2019

Re: [Pdl-devel] Whither PDL?

2019-04-13 Thread Luis Mochan
On Sat, Apr 13, 2019 at 12:45:54AM -0400, Terry Gaetz wrote: > I have been using PDL for more than a decade (or is it two?). Generally, > mere users don't pipe up on pdl-devel... Maybe more PDL users may be found on pdl-general --

Re: [Pdl-devel] Whither PDL?

2019-04-12 Thread Luis Mochan
Hi Ed, On Fri, Apr 12, 2019 at 12:29:07AM +, Ed . wrote: > Dear PDL Developers, > > It’s been nearly a year since the last release of PDL. Currently the > PDL::Lite module does not do what is its entire point, which is to export a > small set of functions that are supposed to work. The PR t

Re: [Pdl-devel] [Pdl-general] PDL-2.018 released to CPAN

2017-05-22 Thread Luis Mochan
8 release > of the Perl Data Language. This release fixes some bugs and, > most importantly, addresses some coming build and compatibility > problems for PDL. > > Thanks much to contributions by Luis Mochan, Bas Couwenberg, > Shawn Laffan, sisyphus, Slaven Rezic, Petr Pisar, Todd R

Re: [Pdl-devel] [Pdl-general] 20th Anniversary OMG

2017-01-19 Thread Luis Mochan
Congratulations! (and thanks for all the work done those years) Luis -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ Apdo. Posta

Re: [Pdl-devel] [Pdl-general] PDL-2.008 released to CPAN

2015-05-24 Thread Luis Mochan
Congratulations and thank you all! Luis On Sun, May 24, 2015 at 07:24:17PM -0400, Chris Marshall wrote: > ...and should be appearing at a CPAN mirror near you soon. > PDL-2.008 is the culmination of over 18 months effort by the PDL developers. > There are many changes both user visible and intern