diff --git a/src/manifolds/Circle.jl b/src/manifolds/Circle.jl index ba0c68d33f..c6b2d7a2f3 100644 --- a/src/manifolds/Circle.jl +++ b/src/manifolds/Circle.jl @@ -166,7 +166,7 @@ function Base.exp(M::Circle{ℂ}, p::Number, X::Number, t::Number) end exp!(::Circle{ℝ}, q, p, X) = (q .= sym_rem(p + X)) -exp!(::Circle{ℝ}, q, p, X, t::Number) = (q .= sym_rem(p + t * X)) +exp!(::Circle{ℝ}, q, p, X, t::Number) = (q .= sym_rem(p[] + t * X[])) function exp!(M::Circle{ℂ}, q, p, X) θ = norm(M, p, X) q .= cos(θ) * p + usinc(θ) * X diff --git a/test/manifolds/circle.jl b/test/manifolds/circle.jl index 07d3eddb6d..46bfe9d226 100644 --- a/test/manifolds/circle.jl +++ b/test/manifolds/circle.jl @@ -288,4 +288,10 @@ using Manifolds: TFVector, CoTFVector ) end end + @testset "Mixed array dimensions for exp" begin + M = Circle() + p = fill(0.0) + exp!(M, p, p, [1.0], 2.0) + @test p ≈ fill(2.0) + end end