Skip to content

Commit

Permalink
Merge pull request #17798 from pabloferz/pz/elwise
Browse files Browse the repository at this point in the history
Restore type parameter for elementwise ops (fix #17794)
  • Loading branch information
tkelman authored Aug 4, 2016
2 parents 8973c7d + a60574b commit e68bc89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/arraymath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function _elementwise(op, ::Type{Any}, A::AbstractArray, B::AbstractArray)
promote_shape(A, B) # check size compatibility
return broadcast(op, A, B)
end
function _elementwise(op, T::Type, A::AbstractArray, B::AbstractArray)
function _elementwise{T}(op, ::Type{T}, A::AbstractArray, B::AbstractArray)
F = similar(A, T, promote_shape(A, B))
for (iF, iA, iB) in zip(eachindex(F), eachindex(A), eachindex(B))
@inbounds F[iF] = op(A[iA], B[iB])
Expand Down

0 comments on commit e68bc89

Please sign in to comment.