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

getindex is broken for Diagonal #9991

Closed
jakebolewski opened this issue Feb 1, 2015 · 1 comment
Closed

getindex is broken for Diagonal #9991

jakebolewski opened this issue Feb 1, 2015 · 1 comment
Assignees
Labels
linear algebra Linear algebra

Comments

@jakebolewski
Copy link
Member

julia> D = Diagonal(Int[])
0x0 Diagonal{Int64}

julia> D[-1]
ERROR: integer division error
 in getindex at linalg/diagonal.jl:30

julia> D[-1,-1]
ERROR: BoundsError()
 in getindex at linalg/diagonal.jl:26

julia> D[1,1
       ]
ERROR: BoundsError()
 in getindex at linalg/diagonal.jl:26

julia> D[2]
ERROR: integer division error
 in getindex at linalg/diagonal.jl:30

julia> D[1,-1]
0
@jakebolewski jakebolewski self-assigned this Feb 1, 2015
@jiahao jiahao added the linear algebra Linear algebra label Feb 1, 2015
mbauman added a commit that referenced this issue Jun 12, 2015
Fixes the last remaining issue in #9991
@mbauman
Copy link
Sponsor Member

mbauman commented Jun 12, 2015

Fixed by c73da0c and #10525.

@mbauman mbauman closed this as completed Jun 12, 2015
fcard pushed a commit to fcard/julia that referenced this issue Jul 8, 2015
Fixes the last remaining issue in JuliaLang#9991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

No branches or pull requests

3 participants