Re: [Pdl-general] Plotting flat xyz data as an image.

2024-04-18 Thread Luis Mochan
If your data is defined on a regular x-y grid you could reshape it to a 2D array, as in gplot(with=>'image',$x->reshape($n,$m), $y->reshape($n,$m), $z->reshape($n,$m)) with $n and $m the number of pixels along x and along y. If the x-y data is irregular but almost on a grid, you could use

Re: [Pdl-general] [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 a

Re: [Pdl-general] [Pdl-devel] naming conventions

2024-01-30 Thread Luis Mochan
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 => 'elgar'); > > print "hello()

Re: [Pdl-general] [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

Re: [Pdl-general] [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-general] 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

Re: [Pdl-general] Changes I noted PDL2.025 -> PDL2.084 - PDL::NiceSlice issue

2024-01-06 Thread Luis Mochan
I found some time back problems with NiceSlice. Actually, with Filter::Simple (used by default by NiceSlice, though it can use other options, controlled with environment variables). I vaguely recall that two slashes, as in two divisions consecutive, confuse it completely, as they seem as regular

Re: [Pdl-general] Changes I noted PDL2.025 -> PDL2.084 - rcols issue

2024-01-06 Thread Luis Mochan
I was able to reproduce it, and I don't understand it. Median, min, max fail even after printing the updated $x, as if there were to different variables $x. On Sun, Jan 07, 2024 at 11:26:56AM +1100, Karl Glazebrook via pdl-general wrote: > Hi all, > > This dinosaur just upgraded from PDL v2.025

Re: [Pdl-general] Changes I noted PDL2.025 -> PDL2.084 - rcols issue

2024-01-06 Thread Luis Mochan
I noticed that medover and maxover do work as expected in this case. On Sun, Jan 07, 2024 at 11:26:56AM +1100, Karl Glazebrook via pdl-general wrote: > Hi all, > > This dinosaur just upgraded from PDL v2.025 to v.2.084 (yes, I know that is > lame) > > I noticed a few things when running one of

Re: [Pdl-general] rotate matrix

2023-10-16 Thread Luis Mochan
On Sun, Oct 15, 2023 at 05:26:12PM -0700, Mark NanoNebulas wrote: > ... > could you put the Rotxz into 4178 dimensions I dont understand how your > doing it in 3 The rotation matrix is a 3x3 matrix. It can operate on a column vector (1x3 matrix) or on many column vectors at once (on an Nx3

Re: [Pdl-general] rotate matrix

2023-10-14 Thread Luis Mochan
os($yy)*sin($zz)+sin($xx); ### cos change the spin of the > electron here > $yyy = $xx*sin($yy)*sin($zz)+sin($xx+$dd); ### sin > $zzz = $xx*cos($zz); ### cos > > this seems to work but can it make all the d orbitals i need ??? > > -Mark Baker > > > On Sat, Oct 1

Re: [Pdl-general] rotate matrix

2023-10-14 Thread Luis Mochan
Hi, I didn't quite understand the code. I simplified it a bit, removed many noop instructions, changed the speed, negated the twiddling and the result looks like a nice lobe of a p orbital, made up of points along some spiral, rotating about its axis. Is this the rotation you want or do you want

[Pdl-general] emacs, perl and jupyter

2023-08-10 Thread Luis Mochan
To those of you that use Emacs to edit Perl programs, or are interested in it: I was able to integrate Zaki Mughal's package Devel::Iperl, with Jupyter and Emacs in order to be able to develop Perl programs (including PDL) incrementally/interactively using code blocks within Org-Mode files. The

Re: [Pdl-general] How do you dice based on a boolean matrix?

2023-08-09 Thread Luis Mochan
You could use whereND, as: pdl> p $target=sequence(5,10) [ [ 0 1 2 3 4] [ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19] [20 21 22 23 24] [25 26 27 28 29] [30 31 32 33 34] [35 36 37 38 39] [40 41 42 43 44] [45

Re: [Pdl-general] Trid demo

2023-07-28 Thread Luis Mochan
points3d($r,{PointSize=>2}) worked for me Regards, Luis On Fri, Jul 28, 2023 at 06:15:32PM -0700, Mark NanoNebulas wrote: > I got cpanm PDL@2.082 to work(install) with all the Trid demos working > perfectly > Thanks Ed Thanks Zaki > can any one give me the right way to change the "points3d"

[Pdl-general] 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-general] PDL::OpenCV 0.001 released

2023-04-04 Thread Luis Mochan
I tried to install PDL::OpenCV under Debian/bookworm using perlbrew and cpanm with perl 5.36.0. I got errors such as: opencv_wrapper.cpp:1:10: fatal error: opencv2/opencv.hpp: No such file or directory 1 | #include I found that the include file had been installed under my perlbrew

Re: [Pdl-general] [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

Re: [Pdl-general] [Pdl-devel] inconsistent determinant

2023-02-14 Thread Luis Mochan
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 Mochan<mailto:moc

[Pdl-general] 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: #

Re: [Pdl-general] PDL::NiceSlice and Perl 5.36

2022-11-05 Thread Luis Mochan
The PDL::NiceSlice bug seems not to be a PDL bug, but rather a Filter::Simple bug. I made a trivial source filter, unrelated to PDL package MyFilter; use v5.36; use Filter::Simple; FILTER_ONLY code_no_comments => sub { say "Code:\n$_" }, all => sub { say "All:\n$_"

Re: [Pdl-general] PDL::NiceSlice and Perl 5.36

2022-11-05 Thread Luis Mochan
Regarding NiceSlice, I made a further couple of tests: Take the program #! /usr/bin/env perl use PDL; BEGIN{$PDL::NiceSlice::debug_filter=1;} use PDL::NiceSlice; my $x=pdl(1); my $V=$x/$x((0))/2; A add the ...debug_filter=1 line to print debugging info. I run it: $

Re: [Pdl-general] PDL::NiceSlice and Perl 5.36

2022-11-04 Thread Luis Mochan
Quite misterious: I simplified the code to the following: #! /usr/bin/env perl use PDL; use PDL::NiceSlice; my $x=sequence(1); my $V=$x/$x((-1)); #my $w=$A/$x((-1)); and it fails with the message syntax error at rem.txt line 5, near "$x(" The error corresponds to the line

Re: [Pdl-general] PDL::NiceSlice and Perl 5.36

2022-11-04 Thread Luis Mochan
e same in the comment are replaced by a call to 'slice'. The same happens if I use $ PDL_NICESLICE_ENGINE=Module::Compile program.pl Thus, I guess the problem lies in PDL::NiceSlice::FilterSimple Regards, Luis On Fri, Nov 04, 2022 at 05:41:46PM -0600, Luis Mochan wrote: > Well, I found h

Re: [Pdl-general] PDL::NiceSlice and Perl 5.36

2022-11-04 Thread Luis Mochan
Well, I found how to get the output from the filter. Consider the code: #! /usr/bin/env perl use PDL; use PDL::NiceSlice; use Filter::sh 'tee rem1.pl'; my $x=sequence(1); my $V=$x/$x((-1)); #my $w=$A/$x((-1)); The line use Filter::sh 'tee rem1.pl'; sends a copy of

Re: [Pdl-general] conv2d

2022-10-10 Thread Luis Mochan
, Oct 10, 2022 at 05:31:43PM -0700, Eric Wheeler wrote: > On Mon, 15 Aug 2022, Luis Mochan wrote: > > > 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 it

Re: [Pdl-general] How would you find where an N-piddle switches from positive to negative?

2022-10-05 Thread Luis Mochan
Maybe rle can gelp get all sign changes, as in your second example: pdl> $a=pdl[ 5.3332316, 4.3332316, 3.3332316, 2.3332316, 1.3332316, 0.33323163, -0.66676837, -1.6667684, -2.6667684, -3.6667684] pdl> p $a [ 5.3332316 4.3332316 3.3332316 2.3332316 1.3332316 0.33323163

Re: [Pdl-general] [Pdl-devel] 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

Re: [Pdl-general] [Pdl-devel] 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 &g

Re: [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

Re: [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-general] conv2d

2022-08-15 Thread Luis Mochan
; 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<mailto:pdl-general@li

Re: [Pdl-general] conv2d

2022-08-15 Thread Luis Mochan
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 regards, &

[Pdl-general] 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

Re: [Pdl-general] [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

Re: [Pdl-general] How do you create a set of cdouble matrices from (real, imag) values?

2022-07-01 Thread Luis Mochan
On Fri, Jul 01, 2022 at 06:48:28PM -0700, Eric Wheeler wrote: > Thanks Ed and Luis! > > I've merged your responses, please see below inline: > ... > > Luis Mochan wrote: > > > use v5.12; > > use PDL; > > use PDL::Constants qw(PI); > > use PDL::IO::Mis

Re: [Pdl-general] How do you create a set of cdouble matrices from (real, imag) values?

2022-07-01 Thread Luis Mochan
Hi, I would do: use v5.12; use PDL; use PDL::Constants qw(PI); use PDL::IO::Misc; # read all data, skip first row my ($f, $M11, $A11, $M21, $A21, $M12, $A12, $M22, $A22)=rcols "rem.s2p", {LINES=>"1:-1:1"}; my $rows=$f->nelem; my $M=pdl($M11, $M12, $M21, $M22); # Indices: filerow, position my

Re: [Pdl-general] PDL 2.078

2022-04-12 Thread Luis Mochan
On Tue, Apr 12, 2022 at 02:55:08PM +, Ed . wrote: > Hi Luis! > > Glad to hear Minuit is still in use. If it were removed from main > PDL, it would only be to make it available separately on CPAN as > PDL::Minuit (somewhat similar to PDL::FFTW3). That's a good option. > I’m afraid I’m not

Re: [Pdl-general] PDL 2.078

2022-04-11 Thread Luis Mochan
On Mon, Apr 11, 2022 at 04:12:43PM +, Ed . wrote: > ... > ...The Fortran code in those submodules (Minuit and Slatec) are > written in Fortran 77, and are dramatically obsolete. We may or may > not remove them into separate distributions, since I doubt anyone uses > them. I do... :( What

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

2021-10-03 Thread Luis Mochan
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 Perl and ordinary PDL.

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

2021-10-02 Thread Luis Mochan
ction. 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 than 4, or (as mentioned below) with a large number of > different ray heights. That

[Pdl-general] 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,

Re: [Pdl-general] [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, |

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

2021-09-26 Thread Luis Mochan
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: Luis Mochan<mailto:moc...@icf.unam

Re: [Pdl-general] [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-general] 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

[Pdl-general] 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-general] [moc...@icf.unam.mx: Re: [Pdl-devel] 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-general] 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-general] [moc...@icf.unam.mx: Re: [Pdl-devel] 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

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

2021-06-07 Thread Luis Mochan
egards, Luis ps. And thanks for the enormous effort you are doing. > > Best regards, > Ed > > From: Luis Mochan<mailto:moc...@icf.unam.mx> > Sent: 01 June 2021 01:46 > To: perldl<mailto:pdl-general@lists.sourceforge.net> > Subject: Re: [Pdl-general] [Pdl-devel] lu_bac

Re: [Pdl-general] [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

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

2021-05-31 Thread Luis Mochan
Now the dims of > the results will all be the same. > > As soon as I’m confident these changes haven’t broken any other stuff, I’ll > be releasing them. Thanks for the report! > > Best regards, > Ed > > From: Luis Mochan<mailto:moc...@icf.unam.mx> > Sent: 29 Ma

Re: [Pdl-general] [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 > -

[Pdl-general] 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

Re: [Pdl-general] Feedback on PDL-Graphics-Gnuplot pause_until_close functionality

2021-05-23 Thread Luis Mochan
Hello, On Fri, May 21, 2021 at 12:29:02PM -0400, Zakariyya Mughal wrote: > Hello all, > > I've added a method to help wait for the Gnuplot window to close before > continuing execution in this PR > . This is > equivalent to `waitfor(H)`

Re: [Pdl-general] [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 >

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

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-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

Re: [Pdl-general] [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

Re: [Pdl-general] [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

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

2021-03-06 Thread Luis Mochan
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 Sat, Mar 06, 2021 at 05:12:40

Re: [Pdl-general] [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 Mochan wr

Re: [Pdl-general] [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

Re: [Pdl-general] [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

Re: [Pdl-general] [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

Re: [Pdl-general] [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 >

Re: [Pdl-general] [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

Re: [Pdl-general] [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-general] [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-general] [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

Re: [Pdl-general] [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-general] [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-general] [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: > Just intal

Re: [Pdl-general] [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-general] [Pdl-devel] PDL 2.026_01 released to CPAN

2021-02-20 Thread Luis Mochan
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 exists in PDL::Complex. Question: does this new “native” complex > support me

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

2021-02-19 Thread Luis Mochan
l> 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, Feb 19,

Re: [Pdl-general] [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

Re: [Pdl-general] [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

Re: [Pdl-general] [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 >

[Pdl-general] PDL::IO::Pic

2020-03-26 Thread Luis Mochan
I have a program that uses rpic to open image files provided by the user. I want to give a diagnostic message if rpic cannot read the file without calling rpic and having it fail. The package PDL::IO::Pic provides the routine rpiccan to check for a specific type of image. However, I would have to

Re: [Pdl-general] Radon

2020-03-10 Thread Luis Mochan
DeForest wrote: > Cool! > > If the PDL high-level implementation isn’t zippy enough, I’d be happy to give > some pointers on PP-izing it. > > > On Mar 9, 2020, at 1:59 PM, Luis Mochan wrote: > > > > Well, I found a nice fast algorithm for a direct and an inverse Radon

Re: [Pdl-general] Radon

2020-03-09 Thread Luis Mochan
hat Perl should have > > in it's toolbox if we want our language to be serious about Scientific > > Perl. I think I've got a "tuit" around here somewhere. :) > > > > Saludos, > > Boyd > > > > On Thu, Mar 5, 2020 at 4:

Re: [Pdl-general] docker

2020-02-28 Thread Luis Mochan
not the Docker > container's fault. (I should look into fixing that) > > I wonder if this will sort out the problems some people have installing > graphics packages on Windows? > https://perlmonks.org/?node_id=1203 > (mindful of the old adage that adding another technology to a

[Pdl-general] docker

2020-02-23 Thread Luis Mochan
After a long time, I did a fresh DOCKER container to facilitate the installation of the current PDL on linux. The container is based on the current Debian/testing distribution and on PERL-5.30.1. Some instructions for its installation and use are in

Re: [Pdl-general] [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-general] CHM passing on PDL maintainer torch

2019-11-09 Thread Luis Mochan
On Sat, Nov 09, 2019 at 11:20:36PM +0100, Ingo Schmid wrote: > Hello, > > has this list and PDL development stopped altogether Hope not... > with Chris passing > on the hat? That would be a doubly sad development. I would like to learn about the innards of PDL and then help when I find me

Re: [Pdl-general] CHM passing on PDL maintainer torch

2019-07-29 Thread Luis Mochan
I'm grateful to Chris for all his work, to Ed and Diab for accepting the responsability of keeping PDL alive and well, to all of those that have helped build, develop and keep the system, and who have helped me and my colleagues whenever we've stumbled. Regards, Luis On Sat, Jul 27, 2019 at

Re: [Pdl-general] Converting NumPY examples to PDL

2019-07-13 Thread Luis Mochan
How about pdl> $a=pdl(1,2,3) pdl> p pdl($a(*3),$a(:,*3))->flat [1 1 1 2 2 2 3 3 3 1 2 3 1 2 3 1 2 3] pdl> though you might prefer pdl> p append($a(*3)->flat,$a(:,*3)->flat) [1 1 1 2 2 2 3 3 3 1 2 3 1 2 3 1 2 3] to avoid problems when the shapes of the intermediate arrays are

Re: [Pdl-general] Converting NumPY examples to PDL

2019-07-13 Thread Luis Mochan
> ...incompatible. The *3 inserts a dummy dimension of size 3 in the first > place, producing three identical columns, while :,*3 produces a dummy > dimension of size 3 as the second index, so you produce tree identical > columns, I meant three identical rows --

Re: [Pdl-general] [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

[Pdl-general] 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

Re: [Pdl-general] Fw: [Pdl-devel] Whither PDL?

2019-04-14 Thread Luis Mochan
On Sun, Apr 14, 2019 at 06:23:15PM +, Ed . wrote: > Hi Luis, > > I have been pushing for a very long time to split down PDL, which is > accepted in principle (see this message from 2015: > ... > PDLA was conceived as a way to break this logjam. Therefore, while I of > course agree with

Re: [Pdl-general] Fw: [Pdl-devel] Whither PDL?

2019-04-14 Thread Luis Mochan
On Sun, Apr 14, 2019 at 04:30:42PM +, Ed . wrote: > Dear pdl-general list, (had to send again, after subscribing - whoops) > > Luis has quite correctly reminded me of this list. I have very recently > revived the question of "whither PDL", and am very interested to get the > thoughts of the

Re: [Pdl-general] extutils-f77

2019-02-18 Thread Luis Mochan
On Mon, Feb 18, 2019 at 11:08:09AM -0500, Chris Marshall wrote: > I was going to suggest enabling the debug option > by setting $ExtUtils::F77::DEBUG = 1 before the > use ExtUtils::F77 but while that worked for my > installed version 1.20 it generated no useful > output from the version 1.23. > >

[Pdl-general] extutils-f77

2019-02-17 Thread Luis Mochan
I just upgraded my perl to 5.28.1, reinstalled all my modules (including PDL and ExtUtils::F77), and when I try to Build one of my packages I get and error as the following: $./Build # process_pd_files # provideslib/Photonic/ExtraUtils.pd Loaded ExtUtils::F77 version 1.23

Re: [Pdl-general] complex operations

2019-01-23 Thread Luis Mochan
On Sun, Jan 20, 2019 at 08:45:31PM -0600, Luis Mochan wrote: > ... > On Fri, Jan 18, 2019 at 11:48:01PM -0700, Derek Lamb wrote: > > Hi Luis, > > > > This was fixed with below commit on the complex_atan2 branch. That branch > > has not yet been merged int

Re: [Pdl-general] complex comparisons

2019-01-20 Thread Luis Mochan
f5b4fc5e73b3b9d924cac34d48fb002f3 > > > On Jan 18, 2019, at 8:08 PM, Luis Mochan wrote: > > > > In one program I made a mistake today which was difficult to find. To > > illustrate my mistake, consider the following oneliner: > > > > $ perl -MPDL -MPDL::Complex -

[Pdl-general] complex comparisons

2019-01-18 Thread Luis Mochan
In one program I made a mistake today which was difficult to find. To illustrate my mistake, consider the following oneliner: $ perl -MPDL -MPDL::Complex -E '$z=1+i; say $z->real > 0' The complex variable is converted to a pdl with two reals both of which are greater than zero, so the result

  1   2   >