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

Special-case OneIndexedArray{Float64} print/show #467

Merged
merged 1 commit into from
Jun 25, 2015
Merged

Conversation

joehuchette
Copy link
Contributor

m = Model()
@defVar(m, x[1:3,1:4])

Before:

julia> getValue(x)
x: 2 dimensions:
[1,:]
  [1,1] = NaN
  [1,2] = NaN
  [1,3] = NaN
  [1,4] = NaN
[2,:]
  [2,1] = NaN
  [2,2] = NaN
  [2,3] = NaN
  [2,4] = NaN
[3,:]
  [3,1] = NaN
  [3,2] = NaN
  [3,3] = NaN
  [3,4] = NaN

After:

julia> getValue(x)
3x4 Array{Float64,2}:
 NaN  NaN  NaN  NaN
 NaN  NaN  NaN  NaN
 NaN  NaN  NaN  NaN

@IainNZ
Copy link
Collaborator

IainNZ commented Jun 24, 2015

Much needed

@IainNZ
Copy link
Collaborator

IainNZ commented Jun 24, 2015

I wish there was a more succinct println(iround(getValue(x[:,:])))

@mlubin
Copy link
Member

mlubin commented Jun 25, 2015

All green now

mlubin added a commit that referenced this pull request Jun 25, 2015
Special-case OneIndexedArray{Float64} print/show
@mlubin mlubin merged commit 6dc2ea5 into master Jun 25, 2015
@IainNZ IainNZ deleted the OIA-print branch September 5, 2015 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants