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

Don't overwrite Base.vect for numbers with a different implementation #5

Merged
merged 1 commit into from
Nov 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)