Skip to content

Commit d702197

Browse files
committed
Clean up
1 parent fc9f01e commit d702197

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/hamiltonian.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ function ∂H∂r(h::Hamiltonian{<:DiagEuclideanMetric,<:GaussianKinetic}, r::Ab
4646
(; M⁻¹) = h.metric
4747
(first(__axes(M⁻¹)) !== first(__axes(r))) &&
4848
throw(ArgumentError("Axes of mass matrix and momentum must match"))
49-
return h.metric.M⁻¹ .* r
49+
return M⁻¹ .* r
5050
end
5151
function ∂H∂r(h::Hamiltonian{<:DenseEuclideanMetric,<:GaussianKinetic}, r::AbstractVecOrMat)
5252
(; M⁻¹) = h.metric
5353
(last(__axes(M⁻¹)) !== first(__axes(r))) &&
5454
throw(ArgumentError("Axes of mass matrix and momentum must match"))
55-
return h.metric.M⁻¹ * r
55+
return M⁻¹ * r
5656
end
5757

5858
# TODO (kai) make the order of θ and r consistent with neg_energy

src/utilities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ end
2525
"""
2626
__axes(r::AbstractVecOrMat)
2727
28-
Return the axes of input `r` where `r` can be generic arrays or custom arrays.
28+
Return the axes of input `r`, where `r` can be `AbstractArrays`, `ComponentArrays` or other custom arrays.
2929
"""
3030
@inline __axes(r::AbstractVecOrMat) = axes(r)
3131

0 commit comments

Comments
 (0)