Skip to content

Commit 93d66c2

Browse files
committed
use fieldcount
1 parent cd184d0 commit 93d66c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tangent.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ function Base.getindex(tb::TaylorBundle, tti::CanonicalTangentIndex)
229229
end
230230

231231
"for a TaylorTangent{N, <:Tuple} this breaks it up unto 1 TaylorTangent{N} for each element of the primal tuple"
232-
function destructure(r::TaylorTangent{N, B}) where {N, B<:Tuple}
233-
return ntuple(length(fieldnames(B))) do field_ii
232+
function zip(r::TaylorTangent{N, B}) where {N, B<:Tuple}
233+
return ntuple(fieldcount(B)) do field_ii
234234
the_primal = primal(r)[field_ii]
235235
the_partials = ntuple(N) do order_ii
236236
partial(r, order_ii)[field_ii]

0 commit comments

Comments
 (0)