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] conditional inline

2025-01-23 Thread Ed .
@lists.sourceforge.net ; perldl Subject: Re: [Pdl-devel] conditional inline Hi Boyd, thank you very much for your suggestions. Using that idea we might obtain a simpler solution. pdl> $r=zeroes(3,3)->ndcoords/2-pdl(0.5,0.5) pdl> $rr=$r->magnover pdl> $mask= $rr<0.4 pdl>

Re: [Pdl-devel] conditional inline

2025-01-23 Thread Guillermo P. Ortiz
>>>> >>>> But this seem did not work for complex number >>>> >>>> pdl> $r1.=$r1*(1+i) >>>> >>>> pdl> $r2.=$r2-(1+i) >>>> >>>> >>>> pdl> p $r >>>> >>>> [ >

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Ed .
egards, Ed From: Guillermo P. Ortiz Sent: 22 January 2025 22:02 To: Ed . Cc: pdl-devel@lists.sourceforge.net ; perldl Subject: Re: [Pdl-devel] conditional inline OK Ed, in my version PDL2.098 still there does not exist whichND_both. But, let me resume here the problem

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Guillermo P. Ortiz
7;s > stupid but it works, it's not stupid." But I am interested to know if > whichND_both is helpful. > > Best regards, > Ed > > -- > *From:* Guillermo P. Ortiz > *Sent:* 22 January 2025 21:06 > *To:* Ed . > *Cc:* pdl-devel@lis

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Ed .
whichND_both is helpful. Best regards, Ed From: Guillermo P. Ortiz Sent: 22 January 2025 21:06 To: Ed . Cc: pdl-devel@lists.sourceforge.net ; perldl Subject: Re: [Pdl-devel] conditional inline Hi Ed, yes I realize that problem and use r2C on $r before to apply

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Guillermo P. Ortiz
> > Best regards, > Ed > > -- > *From:* Guillermo P. Ortiz > *Sent:* 21 January 2025 23:35 > *To:* Ed . > *Cc:* pdl-devel@lists.sourceforge.net ; > perldl > *Subject:* Re: [Pdl-devel] conditional inline > > Hi Ed, > yes, just I wa

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Ed .
Guillermo P. Ortiz Sent: 21 January 2025 23:35 To: Ed . Cc: pdl-devel@lists.sourceforge.net ; perldl Subject: Re: [Pdl-devel] conditional inline Hi Ed, yes, just I was trying with where_both But I get unexpected behaviour for me in 2D case 1) first in 1D pdl> $r=zeroes(3)->ndcoords/2-pdl(0.5)

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Ed .
Best regards, Ed From: Guillermo P. Ortiz Sent: 22 January 2025 16:24 To: Ed . Cc: pdl-devel@lists.sourceforge.net ; perldl Subject: Re: [Pdl-devel] conditional inline Hello again, I find some a not pretty solution using whereND $r=(zeroes(3,3)->ndcoords/

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Boyd Duffee
not work in 2D for real case neither >>> >>> pdl> $r=zeroes(3,3)->ndcoords/2-pdl(0.5,0.5) >>> >>> pdl> p $r >>> >>> [ >>> [ >>> [-0.5 -0.5] >>> [ 0 -0.5] >>> [ 0.5 -0.5] >>> ] >>&

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Guillermo P. Ortiz
ó: >>> >>> Yes Ed, you are right. >>> I want to perform different operations on $r >>> depending on its distance to a point $r0 in 2D. >>> Then, I guess that first, and because for further >>> manipulation, I decide to center $r-=$r0 in >>>

Re: [Pdl-devel] conditional inline

2025-01-22 Thread Guillermo P. Ortiz
0 0] > > what I doing wrong here? > > Regards > > > > > > > > > > > > > > > > > > > > > > > El mar., 21 de enero de 2025 19:42, Ed . escribió: > >> Hi Guillermo, >> >> That does feel to me like you'd want to *not

Re: [Pdl-devel] conditional inline

2025-01-21 Thread Guillermo P. Ortiz
ndarray, but instead do something on a $pdl->where(condition...). What do > you think? > > Best regards, > Ed > > -- > *From:* Guillermo P. Ortiz > *Sent:* 21 January 2025 19:07 > *To:* Ed . > *Cc:* pdl-devel@lists.sourceforge.net ; >

Re: [Pdl-devel] conditional inline

2025-01-21 Thread Ed .
Cc: pdl-devel@lists.sourceforge.net ; perldl Subject: Re: [Pdl-devel] conditional inline For instance, I am trying with $r, like below $r=(zeroes(2*$N+1,2*$N+1)->ndcoords-pdl($N,$N))/(2*$N+1) Regards El mar, 21 ene 2025 a las 14:39, Guillermo P. Ortiz (mailto:gor...@exa.unne.edu.ar>>)

Re: [Pdl-devel] conditional inline

2025-01-21 Thread Guillermo P. Ortiz
that there's some real problem you're trying to solve, but I'm >> afraid I still have absolutely no idea what it is. Please help me help you! >> >> Best regards, >> Ed >> >> -- >> *From:* Guillermo P. Ortiz >> *Se

Re: [Pdl-devel] conditional inline

2025-01-21 Thread Guillermo P. Ortiz
, but I'm > afraid I still have absolutely no idea what it is. Please help me help you! > > Best regards, > Ed > > -- > *From:* Guillermo P. Ortiz > *Sent:* 21 January 2025 01:19 > *To:* Ed . > *Cc:* pdl-devel@lists.sourceforge.net

Re: [Pdl-devel] conditional inline

2025-01-21 Thread Ed .
lists.sourceforge.net>>; perldl mailto:pdl-gene...@lists.sourceforge.net>> Subject: Re: [Pdl-devel] conditional inline Thanks Ed, Using ternary conditional expression I still have some problem with múltiple disensión case. See my example in message befare El El lun, 20 ene 2025 a la(s) 19:31, Ed . m

Re: [Pdl-devel] conditional inline

2025-01-20 Thread Guillermo P. Ortiz
:-) > > Best regards, > Ed > > -- > *From:* Guillermo P. Ortiz > *Sent:* 20 January 2025 23:35 > *To:* Ed . > *Cc:* pdl-devel@lists.sourceforge.net ; > perldl > *Subject:* Re: [Pdl-devel] conditional inline > > Thanks Ed, > Using ternary conditional expression > I

Re: [Pdl-devel] conditional inline

2025-01-20 Thread Ed .
s, Ed From: Guillermo P. Ortiz Sent: 20 January 2025 23:35 To: Ed . Cc: pdl-devel@lists.sourceforge.net ; perldl Subject: Re: [Pdl-devel] conditional inline Thanks Ed, Using ternary conditional expression I still have some problem with múltiple disensión case. See my examp

Re: [Pdl-devel] conditional inline

2025-01-20 Thread Guillermo P. Ortiz
$pdl->approx_artol(0.5, 0.2) > > Best regards, > Ed > > -- > *From:* Guillermo P. Ortiz > *Sent:* 20 January 2025 19:39 > *To:* pdl-devel@lists.sourceforge.net ; > perldl > *Subject:* [Pdl-devel] conditional inline > > Hello ! > >

Re: [Pdl-devel] conditional inline

2025-01-20 Thread Ed .
pprox_artol: (which would also mean it ran quicker) $pdl->approx_artol(0.5, 0.2) Best regards, Ed From: Guillermo P. Ortiz Sent: 20 January 2025 19:39 To: pdl-devel@lists.sourceforge.net ; perldl Subject: [Pdl-devel] conditional inline Hello ! I am not

[Pdl-devel] conditional inline

2025-01-20 Thread Guillermo P. Ortiz
Hello ! I am not sure, but maybe It is possible to do with perl PDL something like this? $ndarray= condition on $ndarray ? assign when true : assign when false for example: $x=zeroes(20)->xlinvals(0,1); $y=(all abs($x-0.5)<0.2)?$x**2:$x; Thanks in advance Regards -- Dr. Guillermo P. Orti