Skip to content

Commit 882a939

Browse files
committed
Fix doctests
1 parent f417fcb commit 882a939

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/interface.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ See also [`withgradient`](@ref) to keep the value `f(args...)`,
5858
and [`pullback`](@ref) for value and back-propagator.
5959
6060
```jldoctest; setup=:(using Zygote)
61-
julia> gradient(*, 2, 3, 5)
62-
(15, 10, 6)
61+
julia> gradient(*, 2.0, 3.0, 5.0)
62+
(15.0, 10.0, 6.0)
6363
64-
julia> gradient(x -> sum(abs2,x), [7, 11, 13])
65-
([14, 22, 26],)
64+
julia> gradient(x -> sum(abs2,x), [7.0, 11.0, 13.0])
65+
([14.0, 22.0, 26.0],)
6666
6767
julia> gradient([7, 11], 0, 1) do x, y, d
6868
p = size(x, d)

0 commit comments

Comments
 (0)