Skip to content

Commit 7863913

Browse files
Update docs/src/opting_out_of_rules.md
Co-authored-by: willtebbutt <[email protected]>
1 parent ff91928 commit 7863913

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/opting_out_of_rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ But sometimes, it is the case that ADing the (faster, more specific) primal for
2929
Consider a summing [`SkewSymmetric` (anti-symmetric)](https://en.wikipedia.org/wiki/Skew-symmetric_matrix) matrix.
3030
The skew symmetric matrix has structural zeros on the diagonal, and off-diagonals are paired with their negation.
3131
Thus the sum is always going to be zero.
32-
As such the author of that matrix type would probably ahve overloaded `sum(x::SkewSymmetric{T}) where T = zero(T)`.
32+
As such the author of that matrix type would probably have overloaded `sum(x::SkewSymmetric{T}) where T = zero(T)`.
3333
ADing this would result in the tangent computed for `x` as `ZeroTangent()` and it would be very fast since AD can see that `x` is never used in the right-hand side.
3434
In contrast the generic method for `AbstractArray` defined above would have to allocate the fill array, and then compute the skew projection.
3535
Only to findout the output would be projected to `SkewSymmetric(zeros(T))` anyway (slower, and a less useful type).

0 commit comments

Comments
 (0)