Skip to content

Commit d4ef4e3

Browse files
committed
add type annotation to _evaluate function
1 parent 8efb50b commit d4ef4e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tensortrain.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ function to_tensors(obj::TensorTrainFit{ValueType}, x::Vector{ValueType}) where
8888
]
8989
end
9090

91-
_evaluate(tt, indexset) = only(prod(T[:, i, :] for (T, i) in zip(tt, indexset)))
91+
function _evaluate(tt::Vector{Array{V, 3}}, indexset) where {V}
92+
only(prod(T[:, i, :] for (T, i) in zip(tt, indexset)))
93+
end
9294

9395
function (obj::TensorTrainFit{ValueType})(x::Vector{ValueType}) where {ValueType}
9496
tensors = to_tensors(obj, x)

0 commit comments

Comments
 (0)