Skip to content

Commit

Permalink
Fix promotion inference
Browse files Browse the repository at this point in the history
  • Loading branch information
BioTurboNick committed Sep 16, 2024
1 parent 26b61c5 commit ccf6570
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rulesets/Base/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function ∇eachslice(dys_raw, x::AbstractArray, vd::Val{dim}) where {dim}
if i1 === nothing # all slices are Zero!
return _zero_fill!(similar(x, float(eltype(x)), axes(x)))
end
T = promote_type(eltype.(dys)...)
T = Base.promote_eltype(dys...)
# The whole point of this gradient is that we can allocate one `dx` array:
dx = similar(x, T, axes(x))
for i in axes(x, dim)
Expand Down

0 comments on commit ccf6570

Please sign in to comment.