Skip Menu |

This queue is for tickets about the PDL-FuncND CPAN distribution.

Report information
The Basics
Id: 88857
Status: resolved
Priority: 0/
Queue: PDL-FuncND

People
Owner: djerius [...] cpan.org
Requestors: chm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.06
Fixed in: 0.08



Subject: suggested minor cleanup for PDL-2.007
In verifying that PDL::FuncND against the PDL-2.007 pre0
I made a few changes to reduce the import requirements
and to use PDL::Constants rather than Math::Trig.  The
motivation is for the eventual regularization of the PDL
import routines to allow for specific selection of routines
to import or not.
Subject: patch-pdl-funcnd.txt
--- lib/PDL/FuncND.pm 2012-06-19 11:51:58.000000000 -0400 +++ blib/lib/PDL/FuncND.pm 2013-09-21 11:47:11.091176200 -0400 @@ -24,14 +24,12 @@ use strict; use warnings; -use Math::Trig qw[ pi ]; - -use PDL; -use PDL::Math; -use PDL::Transform qw[]; -use PDL::Options qw[ iparse ]; - -use Math::Trig qw[ pi ]; +use PDL::LiteF; +use PDL::Constants qw( PI ); +use PDL::Math qw( lgamma ); +use PDL::MatrixOps qw( determinant identity ); +use PDL::Transform qw(); +use PDL::Options qw( iparse ); use base 'PDL::Exporter'; @@ -371,7 +369,7 @@ my $pdf = _gamma((1+$k)/2) / ( _gamma(1/2) - * pi**($k/2) + * PI**($k/2) * sqrt(determinant( $par{scale} )) * (1 + $d2) ** ( (1+$k)/2 ) ); @@ -541,7 +539,7 @@ { squared => 1, ( defined $par{center} ? (center => $par{center}) : () ) }); - my $log_pdf = -( $par{ndims} * log(2 * pi) + my $log_pdf = -( $par{ndims} * log(2 * PI) + log( determinant( $par{scale} )) + $d2 )/2;
On Sat Sep 21 11:53:38 2013, CHM wrote: Show quoted text
> In verifying that PDL::FuncND against the PDL-2.007 pre0 > I made a few changes to reduce the import requirements > and to use PDL::Constants rather than Math::Trig. The > motivation is for the eventual regularization of the PDL > import routines to allow for specific selection of routines > to import or not.
Thanks, I won't be able to get to this for a couple of weeks, unfortunately. I've got a release version almost ready to go which adds a Moffat function, so your fixes are timely.