Skip to content

Commit 3653ab2

Browse files
author
Miha Zgubic
committed
simplify -
1 parent 9726aee commit 3653ab2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tangent_arithmetic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ end
144144
Base.:+(a::Dict, d::Tangent{P}) where {P} = merge(+, a, backing(d))
145145
Base.:+(a::Tangent{P}, b::P) where {P} = b + a
146146

147-
Base.:-(tangent::Tangent{P}) where {P} = map(x -> -x, tangent)
147+
Base.:-(tangent::Tangent{P}) where {P} = map(-, tangent)
148148

149149
# We intentionally do not define, `Base.*(::Tangent, ::Tangent)` as that is not meaningful
150150
# In general one doesn't have to represent multiplications of 2 differentials

0 commit comments

Comments
 (0)