JuliaLang/julia — pull request #5925 by astrieanna (2014-02-24 00:49:27+00:00)
Title: getindex(Cholesky{T},Symbol): Changed Char to Symbol in call to Triangular

The `getindex(Cholesky{T},Symbol)` method makes a call to `Triangular(Array{T,2},Char)`, which does not exist. I made the minimal change to make it run without errors.

**I don't understand what this function does; I just made a change that makes it run.** I'm happy to make a different change (or an issue) if this fix is wrong.

The current behavior:
~~~julia
julia> m = [ 1 1; 1 0]
2x2 Array{Int64,2}:
1 1
1 0

julia> c = Cholesky(m,'U')
Cholesky{Int64} with factor:
2x2 Array{Int64,2}:
1 1
0 0

julia> c[:UL]
ERROR: no method Triangular{T<:Number}(Array{Int64,2}, Char)
in getindex at linalg/factorization.jl:55
~~~

After this change (omitting identical setup of m & c):
~~~.julia
julia> c[:UL]
2x2 Triangular{Int64}:
1 1
0 0
~~~