- 
                Notifications
    
You must be signed in to change notification settings  - Fork 45
 
Closed
Description
A = OffsetArray(rand(3), -3)
diagm(A)results in
ERROR: size not supported for arrays with indices (-2:0,); see http://docs.julialang.org/en/latest/devdocs/offset-arrays/
Stacktrace:
 [1] errmsg(::OffsetArrays.OffsetArray{Float64,1,Array{Float64,1}}) at /Users/twan/code/julia/MixedIntegerExperiments/v0.6/OffsetArrays/src/OffsetArrays.jl:48
 [2] diagm at ./linalg/dense.jl:250 [inlined] (repeats 2 times)
on nightly. This should probably be fixed in Base, but I wanted to get your input first.
As for the desired output type of diagm, I guess it should always be
typeof(similar(A, first(indices(A)), first(indices(A))))?
Metadata
Metadata
Assignees
Labels
No labels