diff --git a/src/compat.jl b/src/compat.jl index 1f3365b73c..e95a2254a8 100644 --- a/src/compat.jl +++ b/src/compat.jl @@ -15,6 +15,7 @@ if VERSION < v"0.7-" @inline function _At_mul_B(A, B) return At_mul_B(A, B) end + expmat = expm else using SparseArrays, LinearAlgebra import LinearAlgebra: norm, checksquare, LAPACKException, SingularException, @@ -22,4 +23,5 @@ else @inline function _At_mul_B(A, B) return transpose(A) * B end + expmat = exp end diff --git a/test/unit_ExponentialMap.jl b/test/unit_ExponentialMap.jl index 75a515b7ee..ce529a4a56 100644 --- a/test/unit_ExponentialMap.jl +++ b/test/unit_ExponentialMap.jl @@ -68,7 +68,7 @@ for N in [Float64, Float32] σ(sparsevec(d), emap) # check consistency with respect to explicit computation of the matrix exponential - svec_explicit = σ(d, expm(Matrix(m)) * b) + svec_explicit = σ(d, expmat(Matrix(m)) * b) if N == Float64 # precision with Float32 is not sufficient @test svec ≈ svec_explicit @@ -114,7 +114,7 @@ for N in [Float64, Float32] σ(sparsevec(d), projmap) # check consistency with respect to explicit computation of the matrix exponential - P = L * expm(Matrix(m)) * R + P = L * expmat(Matrix(m)) * R svec_explicit = σ(d, P*b) @test svec ≈ svec_explicit end