Skip to content

Commit 6bccf6a

Browse files
ericphansonararslan
authored andcommitted
Remove Base.vect override (#293)
1 parent fe36682 commit 6bccf6a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/atoms/affine/stack.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,4 @@ function hvcat(rows::Tuple{Vararg{Int}}, args::AbstractExprOrValue...)
130130
a += rows[i]
131131
end
132132
return vcat(rs...)
133-
end
134-
135-
Base.vect(args::AbstractExpr...) = transpose(HcatAtom(map(transpose, args)...))
136-
Base.vect(args::AbstractExprOrValue...) = transpose(HcatAtom(map(arg -> transpose(convert(AbstractExpr, arg)), args)...))
137-
138-
# XXX: Reimplementation of the Base method
139-
Base.vect(args::Value...) = copyto!(Vector{Base.promote_typeof(args...)}(undef, length(args)), args)
133+
end

test/test_utilities.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@
8888
@test Convex.imag_conic_form(Constant([1.0, 2.0])) == [0.0, 0.0]
8989
end
9090

91+
@testset "Base.vect" begin
92+
# Issue #223: ensure we can make vectors of variables
93+
@test size([Variable(2), Variable(3,4)]) == (2,)
94+
end
95+
9196
@testset "Iteration" begin
9297
x = Variable(2,3)
9398
s = sum([xi for xi in x])

0 commit comments

Comments
 (0)