Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convex does not support broadcasting #479

Open
odow opened this issue Feb 23, 2022 · 0 comments
Open

Convex does not support broadcasting #479

odow opened this issue Feb 23, 2022 · 0 comments

Comments

@odow
Copy link
Member

odow commented Feb 23, 2022

Convex.jl lacks support for a lot of broadcasting operations.

This causes a bunch of problems like this:

julia> using Convex

julia> x = Variable(2)
Variable
size: (2, 1)
sign: real
vexity: affine
id: 181059

julia> A = rand(2, 2)
2×2 Matrix{Float64}:
 0.290045  0.201488
 0.890725  0.771457

julia> A * x .+ 1
ERROR: MethodError: no method matching iterate(::Convex.MultiplyAtom)
Closest candidates are:
  iterate(::Union{LinRange, StepRangeLen}) at range.jl:664
  iterate(::Union{LinRange, StepRangeLen}, ::Int64) at range.jl:664
  iterate(::T) where T<:Union{Base.KeySet{var"#s79", var"#s78"} where {var"#s79", var"#s78"<:Dict}, Base.ValueIterator{var"#s77"} where var"#s77"<:Dict} at dict.jl:693
  ...
Stacktrace:
 [1] copyto!(dest::Vector{Any}, src::Convex.MultiplyAtom)
   @ Base ./abstractarray.jl:843
 [2] _collect(cont::UnitRange{Int64}, itr::Convex.MultiplyAtom, #unused#::Base.HasEltype, isz::Base.HasLength)
   @ Base ./array.jl:608
 [3] collect(itr::Convex.MultiplyAtom)
   @ Base ./array.jl:602
 [4] broadcastable(x::Convex.MultiplyAtom)
   @ Base.Broadcast ./broadcast.jl:682
 [5] broadcasted(::Function, ::Convex.MultiplyAtom, ::Int64)
   @ Base.Broadcast ./broadcast.jl:1312
 [6] top-level scope
   @ REPL[4]:1

The purpose of this issue is to collate the currently open issues into a single thread, and to make it more discoverable for users coming to report bugs.

Replaces:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant