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

Confusing BoundsError for JuMPArray #549

Closed
joehuchette opened this issue Aug 26, 2015 · 2 comments
Closed

Confusing BoundsError for JuMPArray #549

joehuchette opened this issue Aug 26, 2015 · 2 comments

Comments

@joehuchette
Copy link
Contributor

julia> using JuMP

julia> m = Model();

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

julia> x[4]
ERROR: BoundsError: attempt to access 2-element Array{JuMP.Variable,1}:
 x[2]
 x[3]
  at index [3]
 in getindex at no file
@mlubin
Copy link
Member

mlubin commented Aug 26, 2015

We'll fix this in the JuMPArray rewrite, post 0.10.

@mlubin mlubin added this to the 0.11 milestone Sep 29, 2015
@mlubin mlubin modified the milestones: 0.12, 0.11 Dec 1, 2015
@mlubin mlubin modified the milestones: 0.13, 0.12 Feb 21, 2016
@mlubin mlubin removed this from the 0.13 milestone Apr 29, 2016
@mlubin
Copy link
Member

mlubin commented May 23, 2016

Looks like this is solved now?

julia> x[4]
ERROR: Failed attempt to index JuMPArray along dimension 1: 4 ∉ 2:3
 in error at error.jl:21
 in getindex at /home/mlubin/.julia/v0.4/JuMP/src/JuMPArray.jl:70

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