Skip to content

Commit 297aa5e

Browse files
committed
Ensure we check for non-finite leaves
1 parent ec75527 commit 297aa5e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/DynamicExpressionsBumperExt.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ function bumper_eval_tree_array(
1717
# it with the value of the leaf:
1818
leaf -> begin
1919
ar = @alloc(T, n)
20-
if leaf.constant
20+
ok = if leaf.constant
2121
v = leaf.val::T
2222
ar .= v
23+
isfinite(v)
2324
else
2425
ar .= view(cX, leaf.feature, :)
26+
true
2527
end
26-
ResultOk(ar, true)
28+
ResultOk(ar, ok)
2729
end,
2830
# Branch nodes, we simply pass them to the evaluation kernel:
2931
branch -> branch,

0 commit comments

Comments
 (0)