Skip to content

Commit

Permalink
Restore type parameter for elementwise ops
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloferz committed Aug 3, 2016
1 parent 4330783 commit a60574b
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 a60574b

Please sign in to comment.