From e117c608fe9a230a271562a6a39eaa23f22da7e4 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Fri, 28 Dec 2018 19:08:16 -0500 Subject: [PATCH] fix reference to internal `Zip2` for julia 1.1 --- src/types.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/types.jl b/src/types.jl index ede49bf..8a1f0f7 100644 --- a/src/types.jl +++ b/src/types.jl @@ -136,9 +136,14 @@ function stack(args::SamplePath...) VSamplePath(args[1].tt, vcat((X.yy' for X in args)...)) end -# separate a Zip2 +# separate a zip of two Vectors +if VERSION < v"1.1-" sep(Z::Base.Iterators.Zip2{Vector{T1},Vector{T2}}) where {T1,T2} = T1[z[1] for z in Z], T2[z[2] for z in Z] # takes into account the minimum of length +else +sep(Z::Base.Iterators.Zip{Tuple{Vector{T1},Vector{T2}}}) where {T1,T2} = + T1[z[1] for z in Z], T2[z[2] for z in Z] # takes into account the minimum of length +end copy(X::VSamplePath) = VSamplePath(copy(X.tt), copy(X.yy))