Skip to content

Commit

Permalink
fix an edge case of exp! on Julia 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Dec 16, 2023
1 parent 1e9610b commit 5fa4eed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/manifolds/Circle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions test/manifolds/circle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5fa4eed

Please sign in to comment.