Skip to content

Commit

Permalink
fix a small bug in Hyperbolic copyto! which returned the wrong value.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Sep 15, 2021
1 parent a62e134 commit 6f1fb64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/manifolds/Hyperbolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ for T in _HyperbolicTypes
allocate(p::$T, ::Type{P}, dims::Tuple) where {P} = $T(allocate(p.value, P, dims))

@inline Base.copy(p::$T) = $T(copy(p.value))
Base.copyto!(q::$T, p::$T) = copyto!(q.value, p.value)
function Base.copyto!(q::$T, p::$T)
copyto!(q.value, p.value)
return q
end

Base.similar(p::$T) = $T(similar(p.value))

Expand Down

0 comments on commit 6f1fb64

Please sign in to comment.