Re: [Pdl-devel] magnover

2025-07-28 Thread Luis Mochan
a pdl-devel > Sent: 24 July 2025 21:44 > To: Luis Mochan > Cc: perldl ; perldl > > Subject: Re: [Pdl-devel] magnover > > Hi Luis, > > I'm not a PDL expert, just a hobbyist. In my understanding, reducing > the set of GenericTypes will limit the generated type-loop to th

Re: [Pdl-devel] magnover

2025-07-27 Thread Ed .
. That may not be a problem for your application. Best regards, Ed From: Jörg Sommrey via pdl-devel Sent: 24 July 2025 21:44 To: Luis Mochan Cc: perldl ; perldl Subject: Re: [Pdl-devel] magnover Hi Luis, I'm not a PDL expert, just a hobbyist. In my understanding, reducing the set of G

Re: [Pdl-devel] magnover

2025-07-24 Thread Jörg Sommrey via pdl-devel
Hi Luis, I'm not a PDL expert, just a hobbyist. In my understanding, reducing the set of GenericTypes will limit the generated type-loop to this set and will cause any input arguments outside of this type set to be converted first. This would mean that a large integer vector will be con

Re: [Pdl-devel] magnover

2025-07-24 Thread Luis Mochan
Hi Jörg, Thanks. It does work. I have a question: if the input is some large vector of some kind of integers, is it first converted to a float vector with this solution? Should the possible space wasted be a concern? Regards, Luis I guess, is that On Thu, Jul 24, 2025 at 07:19:50PM +, Jörg

Re: [Pdl-devel] magnover

2025-07-24 Thread Jörg Sommrey via pdl-devel
Hello Luis, probably this does the trick: pp_def('magnover', HandleBad => 1, Pars => "a(n); real [o]b();", GenericTypes => [qw(H C G E D F)], Then in t/ufunc.t (line 106) the expected type just needs to be changed from 'cdouble' to 'double'. Integer types will be promoted to float an

Re: [Pdl-devel] magnover

2025-07-24 Thread Luis Mochan
On Wed, Jul 23, 2025 at 11:56:00AM +, Jörg Sommrey wrote: > Hello Luis, > > the results look fine when the expected types in the two failing tests are > adjusted. Don't know if it would break any "real" code, maybe "is_pdl" is > just too strict here. I believe there are good reasons for the qu

Re: [Pdl-devel] magnover

2025-07-23 Thread Jörg Sommrey via pdl-devel
Hello Luis, the results look fine when the expected types in the two failing tests are adjusted. Don't know if it would break any "real" code, maybe "is_pdl" is just too strict here. t/ufunc.t: is_pdl $empty->magnover, sbyte('BAD'), "bad flag gets set on empty magnover"; is_pdl +(sequence(4

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