Skip to content

LazyExpressions and broadcasting #70

Description

@schmrlng

When defining constraints like @constraint(m, v >= 0) for Vector-valued v on Julia 0.7 we get this deprecation warning

┌ Warning: `a::AbstractArray - b::Number` is deprecated, use `a .- b` instead.
│   caller = optimize_toplevel at lazyexpression.jl:59 [inlined]
└ @ Core ~/.julia/packages/SimpleQP/pHx4o/src/lazyexpression.jl:59

This comes from the minus expressions here but naively replacing those with broadcasted equivalents interferes with the current LazyExpression optimizations. I feel like the answer is to either integrate base broadcasting into LazyExpressions (a potentially daunting task) or to make a localized fix (e.g., maybe turn just this line into a broadcasted equivalent?); what do you think?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions