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

support general colon indexing for JuMPArray #684

Closed
mlubin opened this issue Feb 29, 2016 · 2 comments
Closed

support general colon indexing for JuMPArray #684

mlubin opened this issue Feb 29, 2016 · 2 comments

Comments

@mlubin
Copy link
Member

mlubin commented Feb 29, 2016

https://groups.google.com/forum/#!topic/julia-opt/6eVnmkhiDZg

This is a regression in 0.12:

julia> @defVar(m, x[0:3,0:3])

julia> x[1,:]
ERROR: MethodError: `isless` has no method matching isless(::Colon, ::Int64)
Closest candidates are:
  isless(::AbstractFloat, ::Real)
  isless(::ForwardDiff.ForwardDiffNumber{N,T<:Real,C}, ::Real)
  isless(::Real, ::Real)
  ...
 in getindex at /home/mlubin/.julia/v0.4/JuMP/src/JuMPArray.jl:61

Related issues: #643 #287

To fix the regression I think we should have a special case for colons and put off handling ranges for later.

@tkelman
Copy link
Contributor

tkelman commented Mar 1, 2016

My advisor hit this today. Can the notebooks from https://github.com/JuliaOpt/juliaopt-notebooks maybe be run as tests via NBInclude?

@mlubin mlubin closed this as completed in 3c18a35 Mar 1, 2016
mlubin added a commit that referenced this issue Mar 1, 2016
@mlubin
Copy link
Member Author

mlubin commented Mar 1, 2016

@tkelman, I'd love a way to test the notebooks: JuliaOpt/juliaopt-notebooks#5

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

2 participants