Skip to content

Commit bb4145c

Browse files
authored
Fix incorrect type asssertion in real_operate (#704)
1 parent 93c68c6 commit bb4145c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/real_operate.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function real_operate(
220220
args::AllAllowedReal{T}...,
221221
) where {T<:Real}
222222
all_args = (arg1, arg2, arg3, args...)
223-
return foldl((a, b) -> real_operate(vcat, T, a, b), all_args)::SparseTape{T}
223+
return foldl((a, b) -> real_operate(vcat, T, a, b), all_args)
224224
end
225225

226226
function real_operate(

test/test_utilities.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,13 @@ function test_not_dcp_warn()
14281428
return
14291429
end
14301430

1431+
function test_real_operate_vector()
1432+
x = BigFloat[0]
1433+
y = Convex.real_operate(vcat, BigFloat, x, x, x, x, x)
1434+
@test y == BigFloat[0, 0, 0, 0, 0]
1435+
return
1436+
end
1437+
14311438
end # TestUtilities
14321439

14331440
TestUtilities.runtests()

0 commit comments

Comments
 (0)