Skip to content

Commit efffb3e

Browse files
committed
remove PMCode from acf() definition
1 parent 77966e1 commit efffb3e

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

lib/PDL/Stats/TS.pd

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ pp_addhdr('
4848
);
4949

5050
pp_def('acf',
51-
Pars => 'x(t); [o]r(h)',
52-
OtherPars => 'IV lag=>h',
51+
Pars => 'x(t); [o]r(h=CALC($COMP(lag) < 0 ? $SIZE(t) : $COMP(lag) + 1))',
52+
OtherPars => 'IV lag',
53+
OtherParsDefaults => { lag => -1 },
5354
GenericTypes => $F,
5455
Code => '
5556
$GENERIC(x) s, s2, m, cov0, covh;
@@ -75,14 +76,6 @@ loop (h) %{
7576
}
7677
%}
7778
',
78-
PMCode => pp_line_numbers(__LINE__, <<'EOF'),
79-
sub PDL::acf {
80-
my ($self, $h) = @_;
81-
$h //= $self->dim(0) - 1;
82-
PDL::_acf_int($self, my $r = PDL->null, $h+1);
83-
$r;
84-
}
85-
EOF
8679
Doc => <<'EOD',
8780
=for ref
8881

t/ts.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ subtest 'acf and acvf with lags' => sub {
7979

8080
note 'Take autocorrelation on higher order pdls to be a collection of 1D arrays';
8181
is_pdl $m->acvf(4), $acvf->slice('0:4')->dummy(1,2), "acvf is the same for both rows of sequence(10,2)";
82-
8382
};
8483

8584
done_testing();

0 commit comments

Comments
 (0)