Skip to content

Commit

Permalink
fix guess_tangent_type(::Bool) to return a type
Browse files Browse the repository at this point in the history
oxinabox authored Mar 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7730f38 commit 2f23a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tangent_types/abstract_zero.jl
Original file line number Diff line number Diff line change
@@ -179,7 +179,7 @@ end

# Sad heauristic methods we need because of unassigned values
guess_zero_tangent_type(::Type{T}) where {T<:Number} = T
guess_zero_tangent_type(::Type{Bool}) = NoTangent()
guess_zero_tangent_type(::Type{Bool}) = NoTangent

guess_zero_tangent_type(::Type{T}) where {T<:Integer} = typeof(float(zero(T)))
function guess_zero_tangent_type(::Type{<:Array{T,N}}) where {T,N}

0 comments on commit 2f23a9f

Please sign in to comment.