From 943254572fa40dc724dae6272599a841b806aafa Mon Sep 17 00:00:00 2001 From: Ed J Date: Thu, 4 Apr 2024 18:48:27 +0100 Subject: [PATCH] let test_stats_cmp tolerate broadcasting --- t/stats_glm.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/stats_glm.t b/t/stats_glm.t index 0e1ca54..bce7a3d 100644 --- a/t/stats_glm.t +++ b/t/stats_glm.t @@ -489,7 +489,7 @@ sub test_stats_cmp { ($got, $exp) = map &$func($_), $got, $exp; } $exp = PDL->topdl($exp); - $error += my $this_diff = $got - $exp; + $error = $error + (my $this_diff = $got - $exp); fail($_), diag "got $m->{$_}\nexpected $exp" if any($this_diff->abs > $eps); } return $error;