Skip to content

Commit

Permalink
Revert "Revert "Restore type parameter for elementwise ops""
Browse files Browse the repository at this point in the history
This reverts commit e6f5d89.
ref #17798 and #17389 and #17929
  • Loading branch information
tkelman committed Aug 20, 2016
1 parent 4160a8a commit b9d7579
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 b9d7579

Please sign in to comment.