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

Display regression for tuples of arrays #17087

Closed
omus opened this issue Jun 24, 2016 · 3 comments · Fixed by #17113
Closed

Display regression for tuples of arrays #17087

omus opened this issue Jun 24, 2016 · 3 comments · Fixed by #17113
Labels
regression Regression in behavior compared to a previous version
Milestone

Comments

@omus
Copy link
Member

omus commented Jun 24, 2016

While updating the doctests I found that Julia 0.4.6 displays findn and findnz as the following:

julia> I = [1, 4, 3, 5]; J = [4, 7, 18, 9]; V = [1, 2, -5, 3];

julia> S = sparse(I,J,V)
5x18 sparse matrix with 4 Int64 entries:
    [1 ,  4]  =  1
    [4 ,  7]  =  2
    [5 ,  9]  =  3
    [3 , 18]  =  -5

julia> findn(S)
([1,4,5,3],[4,7,9,18])

julia> findnz(S)
([1,4,5,3],[4,7,9,18],[1,2,3,-5])

while Julia 0.5-dev does:

julia> I = [1, 4, 3, 5]; J = [4, 7, 18, 9]; V = [1, 2, -5, 3];

julia> S = sparse(I,J,V)
5×18 sparse matrix with 4 Int64 nonzero entries:
    [1 ,  4]  =  1
    [4 ,  7]  =  2
    [5 ,  9]  =  3
    [3 , 18]  =  -5

julia> findn(S)
(4-element Array{Int64,1}:
 1
 4
 5
 3,4-element Array{Int64,1}:
  4
  7
  9
 18)

julia> findnz(S)
(4-element Array{Int64,1}:
 1
 4
 5
 3,4-element Array{Int64,1}:
  4
  7
  9
 18,4-element Array{Int64,1}:
  1
  2
  3
 -5)
@rfourquet
Copy link
Member

Not specific to those functions though (the problem is the display of tuples of arrays).

@omus omus changed the title Display regression for findn and findnz Display regression for tuples of arrays Jun 24, 2016
@omus
Copy link
Member Author

omus commented Jun 24, 2016

Found another display issue with tuples of arrays. Julia 0.4 also displayed things oddly:

Julia 0.4

julia> a, b = eig([1.0 0.0 0.0; 0.0 3.0 0.0; 0.0 0.0 18.0])
([1.0,3.0,18.0],
3x3 Array{Float64,2}:
 1.0  0.0  0.0
 0.0  1.0  0.0
 0.0  0.0  1.0)

julia> a
3-element Array{Float64,1}:
  1.0
  3.0
 18.0

julia> b
3x3 Array{Float64,2}:
 1.0  0.0  0.0
 0.0  1.0  0.0
 0.0  0.0  1.0

Julia 0.5-dev

julia> a, b = eig([1.0 0.0 0.0; 0.0 3.0 0.0; 0.0 0.0 18.0])
(3-element Array{Float64,1}:
  1.0
  3.0
 18.0,
3×3 Array{Float64,2}:
 1.0  0.0  0.0
 0.0  1.0  0.0
 0.0  0.0  1.0)

@nalimilan nalimilan added the regression Regression in behavior compared to a previous version label Jun 25, 2016
@nalimilan nalimilan added this to the 0.5.0 milestone Jun 25, 2016
@nalimilan
Copy link
Member

Tentatively adding to 0.5.0 milestone, as it's one of the regressions introduced by the IOContext changes.

vtjnash added a commit that referenced this issue Jun 25, 2016
this attribute doesn't nest properly,
and functions just end up branching almost the entire code based
on this parameter. it' much cleaner as a separate function

fix #17087
fix #16910
vtjnash added a commit that referenced this issue Jun 25, 2016
this attribute doesn't nest properly,
and functions just end up branching almost the entire code based
on this parameter. it' much cleaner as a separate function

fix #17087
fix #16910
vtjnash added a commit that referenced this issue Jun 25, 2016
this attribute doesn't nest properly,
and functions just end up branching almost the entire code based
on this parameter, so it's cleaner as a separate method

fix #17087
fix #16910
fix #17090
vtjnash added a commit that referenced this issue Jun 25, 2016
this attribute doesn't nest properly,
and functions just end up branching almost the entire code based
on this parameter, so it's cleaner as a separate method

fix #17087
fix #16910
fix #17090
JeffBezanson pushed a commit that referenced this issue Jun 29, 2016
this attribute doesn't nest properly,
and functions just end up branching almost the entire code based
on this parameter, so it's cleaner as a separate method

fix #17087
fix #16910
fix #17090
JeffBezanson pushed a commit that referenced this issue Jun 29, 2016
this attribute doesn't nest properly,
and functions just end up branching almost the entire code based
on this parameter, so it's cleaner as a separate method

fix #17087
fix #16910
fix #17090
mfasi pushed a commit to mfasi/julia that referenced this issue Sep 5, 2016
this attribute doesn't nest properly,
and functions just end up branching almost the entire code based
on this parameter, so it's cleaner as a separate method

fix JuliaLang#17087
fix JuliaLang#16910
fix JuliaLang#17090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants