Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ Currently, the `@compat` macro supports the following syntaxes:

* `Val(x)` constructs `Val{x}()`. ([#22475])

* `chol` and `chol!` for `UniformScalings` ([#22633]).

* `logdet` for `Number`s ([#22629]).

## Renamed functions


Expand Down Expand Up @@ -297,3 +301,5 @@ includes this fix. Find the minimum version from there.
[#22064]: https://github.com/JuliaLang/julia/issues/22064
[#22182]: https://github.com/JuliaLang/julia/issues/22182
[#22475]: https://github.com/JuliaLang/julia/issues/22475
[#22633]: https://github.com/JuliaLang/julia/issues/22633
[#22629]: https://github.com/JuliaLang/julia/issues/22629
13 changes: 13 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,19 @@ if VERSION < v"0.7.0-DEV.843"
(::Type{Val})(x) = (Base.@_pure_meta; Val{x}())
end

# https://github.com/JuliaLang/julia/pull/22629
if VERSION < v"0.7.0-DEV.848"
import Base: logdet
logdet(A) = log(det(A))
end

# https://github.com/JuliaLang/julia/pull/22633
if VERSION < v"0.7.0-DEV.1041"
import Base.LinAlg: chol, chol!
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the commit number did not change, " andreasnoack merged commit eb133ab into JuliaLang:master"

contrib/commit-name.sh eb133ab
0.7.0-DEV.1041

chol!(J::UniformScaling, uplo) = UniformScaling(chol!(J.λ, uplo))
chol(J::UniformScaling, args...) = UniformScaling(chol(J.λ, args...))
end

include("deprecated.jl")

# https://github.com/JuliaLang/julia/pull/21746
Expand Down
10 changes: 10 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1882,6 +1882,16 @@ let
@test_throws MethodError Dates.Month(1) < Dates.Day(1)
end

# PR 22629
@test logdet(0.5) == log(det(0.5))

# PR 22633
for T in (Float64, Complex64, BigFloat, Int)
λ = T(4)
@test chol(λ*I).λ ≈ √λ
@test_throws Union{ArgumentError,LinAlg.PosDefException} chol(-λ*I)
end

let
@compat cr(::CartesianRange{2}) = 2
@test cr(CartesianRange((5, 3))) == 2
Expand Down