Skip to content

Commit 72f0307

Browse files
author
Marc Ritter
committed
Merge branch 'fix-jet' into 'main'
add type annotation to _evaluate function See merge request tensors4fields/TensorCrossInterpolation.jl!71
2 parents 8efb50b + d4ef4e3 commit 72f0307

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)