Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit 386410a

Browse files
Avoid Vararg UnionAll dispatch (#104)
* Avoid Vararg UnionAll dispatch Fixes #103 * fix fix Co-authored-by: Simon Christ <[email protected]>
1 parent fdb26b4 commit 386410a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/utils.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,7 @@ inverse_scale_func(scale::Symbol) =
208208
# ## Unzip
209209
# --------------------------------
210210

211-
for i in 2:4
212-
@eval begin
213-
unzip(v::AVec{<:Tuple{Vararg{T, $i} where T}}) =
214-
$(Expr(:tuple, (:([t[$j] for t in v]) for j in 1:i)...))
215-
end
216-
end
217-
211+
unzip(v::AVec{<:Tuple}) = tuple((([t[j] for t in v]) for j in 1:length(v[1]))...)
218212

219213
# --------------------------------
220214
# ## Map functions on vectors

0 commit comments

Comments
 (0)