Skip to content

Commit

Permalink
Merge pull request #60 from yuyichao/0.6
Browse files Browse the repository at this point in the history
Fix 0.6 typealias depwarn
  • Loading branch information
andreasnoack committed Feb 14, 2017
2 parents 8af3861 + 857b61c commit 4687667
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.4
Compat 0.17.0
Compat 0.18.0
12 changes: 6 additions & 6 deletions src/chol.jl
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# needs special attention to Cholesky, as the syntax & behavior changes in 0.4-pre

if VERSION >= v"0.5.0-dev+907"
typealias CholType{T,S<:AbstractMatrix} Cholesky{T,S}
@compat CholType{T,S<:AbstractMatrix} = Cholesky{T,S}
chol_lower(a::Matrix) = ctranspose(chol(a))

typealias CholTypeSparse{T} SparseArrays.CHOLMOD.Factor{T}
@compat CholTypeSparse{T} = SparseArrays.CHOLMOD.Factor{T}

chol_lower(cf::CholTypeSparse) = cf[:L]
elseif VERSION >= v"0.4.0-dev+4370"
# error("Choleksy changes in 0.4.0-dev+4370 (PR #10862), we are still working to make it work with these changes.")

typealias CholType{T,S<:AbstractMatrix} Cholesky{T,S}
@compat CholType{T,S<:AbstractMatrix} = Cholesky{T,S}
chol_lower(a::Matrix) = chol(a, Val{:L})

typealias CholTypeSparse{T} SparseArrays.CHOLMOD.Factor{T}
@compat CholTypeSparse{T} = SparseArrays.CHOLMOD.Factor{T}

chol_lower(cf::CholTypeSparse) = cf[:L]
else
typealias CholType{T,S} Cholesky{T}
@compat CholType{T,S} = Cholesky{T}
chol_lower(a::Matrix) = chol(a, :L)

typealias CholTypeSparse{T} Base.LinAlg.CHOLMOD.CholmodFactor{T}
@compat CholTypeSparse{T} = Base.LinAlg.CHOLMOD.CholmodFactor{T}

chol_lower(cf::CholTypeSparse) = cf
end

0 comments on commit 4687667

Please sign in to comment.