Skip to content

Commit c2e51fd

Browse files
committed
Fix the doctests
1 parent f9afcb4 commit c2e51fd

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/rules.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ unary input, unary output scalar function:
1818
```jldoctest frule
1919
julia> dself = NoTangent();
2020
21-
julia> x = rand()
22-
0.8236475079774124
21+
julia> x = 1.23456
22+
1.23456
2323
2424
julia> sinx, Δsinx = frule((dself, 1), sin, x)
25-
(0.7336293678134624, 0.6795498147167869)
25+
(0.9440031218347901, 0.3299365180851773)
2626
2727
julia> sinx == sin(x)
2828
true
@@ -51,7 +51,7 @@ that return a single output that is iterable, like a `Tuple`.
5151
So this is actually a [`Tangent`](@ref):
5252
```jldoctest frule
5353
julia> Δsincosx
54-
Tangent{Tuple{Float64, Float64}}(0.6795498147167869, -0.7336293678134624)
54+
Tangent{Tuple{Float64, Float64}}(0.3299365180851773, -0.9440031218347901)
5555
```
5656
5757
The optional [`RuleConfig`](@ref) option allows specifying frules only for AD systems that

src/tangent_types/thunks.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ To evaluate the wrapped closure, call [`unthunk`](@ref) which is a no-op when th
178178
argument is not a `Thunk`.
179179
180180
```jldoctest
181-
julia> t = @thunk(3)
182-
Thunk(var"#4#5"())
181+
julia> t = @thunk(3);
183182
184183
julia> unthunk(t)
185184
3

0 commit comments

Comments
 (0)