Skip to content

Commit

Permalink
Merge pull request #5 from mohawk2/fixups
Browse files Browse the repository at this point in the history
Fixups
  • Loading branch information
moocow-the-bovine authored Dec 20, 2024
2 parents fedd61d + 02cfd7a commit b7c2c35
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,21 @@ $hash{VERSION_FROM} = 'HMM.pd';
##
$hash{realclean}{FILES} .= ' *~ *.tmp README.txt';

my $package_name = $package->[2];
(my $repo = $package_name) =~ s#::#-#g;
$repo = "moocow-the-bovine/$repo";
$hash{META_MERGE} = {
"meta-spec" => { version => 2 },
resources => {
homepage => 'http://pdl.perl.org/',
bugtracker => {web=>"https://github.com/$repo/issues"},
repository => {
url => "git://github.com/$repo.git",
type => 'git',
web => "https://github.com/$repo",
},
x_IRC => 'irc://irc.perl.org/#pdl',
},
};

WriteMakefile(%hash);
8 changes: 4 additions & 4 deletions t/03_baum.t
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ sub wantmodel1 {
##-- test: want: a
my ($tmp);
$ea_want = pdl(double, [[0,2], [4,0]])->log;
($tmp=$ea_want->where($ea_want->isfinite->not)) .= logzero;
($tmp=$ea_want->where($ea_want->isfinite->not)) .= logzero->double;
$eb_want = pdl(double, [[6,0], [0,6]])->log;
($tmp=$eb_want->where($eb_want->isfinite->not)) .= logzero;
($tmp=$eb_want->where($eb_want->isfinite->not)) .= logzero->double;
$epi_want = pdl(double, [4,2])->log;
$eomega_want = pdl(double, [2,4])->log;

Expand All @@ -98,12 +98,12 @@ sub wantmodel1 {
##-- model 2: want: maximized
$ahat_want = pdl(double, [[0, 1/3],
[2/3, 0]])->log;
($tmp=$ahat_want->where($ahat_want->isfinite->not)) .= logzero;
($tmp=$ahat_want->where($ahat_want->isfinite->not)) .= logzero->double;

$omegahat_want = pdl(double, [1/3,2/3])->log;

$bhat_want = pdl(double, [[1,0],[0,1]])->log;
($tmp=$bhat_want->where($bhat_want->isfinite->not)) .= logzero;
($tmp=$bhat_want->where($bhat_want->isfinite->not)) .= logzero->double;

$pihat_want = pdl(double, [2/3,1/3])->log;
}
Expand Down

0 comments on commit b7c2c35

Please sign in to comment.