Skip to content

Commit 5befede

Browse files
committed
Fix unbound type issues
1 parent 5241645 commit 5befede

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/AsArray.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ module AsArrayModule
33
using ..EquationModule: AbstractExpressionNode, tree_mapreduce, count_nodes
44

55
function as_array(
6-
::Type{I}, trees::Vararg{N,M}; buffer::Union{AbstractArray,Nothing}=nothing
6+
::Type{I},
7+
tree::N,
8+
additional_trees::Vararg{N,M};
9+
buffer::Union{AbstractArray,Nothing}=nothing,
710
) where {T,N<:AbstractExpressionNode{T},I,M}
11+
trees = (tree, additional_trees...)
812
each_num_nodes = (t -> count_nodes(t; break_sharing=Val(true))).(trees)
913
num_nodes = sum(each_num_nodes)
1014

src/EvaluateEquation.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ function eval_tree_array(
9898
return eval_tree_array(tree, cX, operators; turbo, bumper)
9999
end
100100
function eval_tree_array(
101-
trees::NTuple{M,N}, cX::AbstractMatrix{T}, operators::OperatorEnum; kws...
101+
trees::Tuple{N,Vararg{N,M}}, cX::AbstractMatrix{T}, operators::OperatorEnum; kws...
102102
) where {T<:Number,N<:AbstractExpressionNode{T},M}
103-
outs = ntuple(i -> eval_tree_array(trees[i], cX, operators; kws...)[1], Val(M))
104-
return ntuple(i -> first(outs[i]), Val(M)), ntuple(i -> last(outs[i]), Val(M))
103+
outs = ntuple(i -> eval_tree_array(trees[i], cX, operators; kws...)[1], Val(M + 1))
104+
return ntuple(i -> first(outs[i]), Val(M + 1)), ntuple(i -> last(outs[i]), Val(M + 1))
105105
end
106106

107107
get_nuna(::Type{<:OperatorEnum{B,U}}) where {B,U} = counttuple(U)

0 commit comments

Comments
 (0)