We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09e436e commit 2d4b789Copy full SHA for 2d4b789
1 file changed
test/test_utils.jl
@@ -39,8 +39,8 @@ const _BACKEND_MAP = Dict{Symbol,Any}(
39
40
# Custom isapprox that handles Zygote returning `nothing` for zero gradients
41
function _isapprox_nothing(a, b; kwargs...)
42
- a_val = isnothing(a) ? zero(b) : a
43
- b_val = isnothing(b) ? zero(a) : b
+ a_val = isnothing(a) ? zero.(b) : a
+ b_val = isnothing(b) ? zero.(a) : b
44
return Base.isapprox(a_val, b_val; kwargs...)
45
end
46
0 commit comments