Skip to content

Commit

Permalink
Merge pull request #40 from JeffBezanson/jb/fix11
Browse files Browse the repository at this point in the history
fix reference to internal `Zip2` for julia 1.1
  • Loading branch information
mschauer authored Dec 29, 2018
2 parents 3e9f2f1 + e117c60 commit 3d7ed4e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 3d7ed4e

Please sign in to comment.