Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Overwrite Base.vect for numbers with the same implementation as Base
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Nov 2, 2018
1 parent f111790 commit c851ac9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/atoms/affine/stack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ function hvcat(rows::Tuple{Vararg{Int}}, args::AbstractExprOrValue...)
return vcat(rs...)
end


Base.vect(args::T...) where {T<:AbstractExpr} = transpose(HcatAtom(map(transpose, args)...))
Base.vect(args::AbstractExpr...) = transpose(HcatAtom(map(transpose, args)...))
Base.vect(args::AbstractExprOrValue...) = transpose(HcatAtom(map(arg -> transpose(convert(AbstractExpr, arg)), args)...))
Base.vect(args::Value...) = collect(args)

# XXX: Reimplementation of the Base method
Base.vect(args::Value...) = copyto!(Vector{Base.promote_typeof(args...)}(undef, length(args)), args)

0 comments on commit c851ac9

Please sign in to comment.