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

dot-ops seems incomplete #518

Closed
IainNZ opened this issue Aug 9, 2015 · 3 comments
Closed

dot-ops seems incomplete #518

IainNZ opened this issue Aug 9, 2015 · 3 comments

Comments

@IainNZ
Copy link
Collaborator

IainNZ commented Aug 9, 2015

julia> using JuMP

julia> m = Model()
Feasibility problem with:
 * 0 linear constraints
 * 0 variables
Solver set to Default

julia> @defVar(m, x[1:3,1:3])
x[i,j] free for all i in {1,2,3}, j in {1,2,3}

julia> rand(3,3) .* x
ERROR: MethodError: `.*` has no method matching .*(::Array{Float64,2}, ::JuMP.JuMPArray##6451{JuMP.Variable})
Closest candidates are:
  .*{T}(::AbstractArray{T,N}, ::Number)
  .*(::AbstractArray{T,N}, ::AbstractArray{T,N})
  .*(::AbstractArray{T,N}...)
  ...
@IainNZ
Copy link
Collaborator Author

IainNZ commented Aug 9, 2015

Its weird because

$dotop{T<:JuMPTypes,N}(lhs::Array{T,N},rhs::OneIndexedArray) = $dotop(lhs,rhs.innerArray)

should do it

@IainNZ
Copy link
Collaborator Author

IainNZ commented Aug 9, 2015

Oh shoot should it be JuMPScalar?

@IainNZ
Copy link
Collaborator Author

IainNZ commented Aug 9, 2015

Yep. Making PR with tests

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