Re: [Pdl-devel] interpol vs interpolate

2016-10-17 Thread Karl Glazebrook
Right now, interpol() is a perl wrapper calls the pp routine interpolate() and barfs if it returns an error status. (both at the pp level) One could change interpolate() to do different things in a wantarray/scalar context... - but I do not think that is possible at the pp-level? It seems ine

Re: [Pdl-devel] interpol vs interpolate

2016-10-16 Thread Joel Berger
We have explicitly removed all wantarray behavior from Mojolicious. In a web context it basically will always be a security vulnerability waiting for an unsuspecting application author. In PDL it is more likely to be a bug in waiting than a vuln but you never know. On Sun, Oct 16, 2016 at 8:20 AM

Re: [Pdl-devel] interpol vs interpolate

2016-10-16 Thread David Mertens
Also, this works (append to end of Karl's example): ($y2) = interpolate $x2, $x, $y; These two routines differ in the context they expect to return to, and interpolate's behavior is a known Perl wart. Stever Haryanto gave a nice discussion of this Perl wart: http://blogs.perl.or

Re: [Pdl-devel] interpol vs interpolate

2016-10-15 Thread Chris Marshall
interpol() seems to be implemented in terms of interpolate() already. Does seem a bit confusing. Maybe the two routines could be merged into a "smarter" interpolate()... --Chris On 10/15/2016 05:18, Karl Glazebrook wrote: > Seems to me we should fix this inconsistency in usage? > > - Karl > > us

[Pdl-devel] interpol vs interpolate

2016-10-15 Thread Karl Glazebrook
Seems to me we should fix this inconsistency in usage? - Karl use PDL; $x = sequence(100); $y = $x**2; $x2 = sequence(10)*10; # This works $y2 = interpol $x2, $x, $y; print $y2, "\n"; # This does not work $y2 = interpolate $x2, $x, $y; print $y2, "\n"; # But this does ($y2,$err) = interpolate