Skip to content

Commit

Permalink
Deprecate manually vectorized rem methods in favor of compact broadca…
Browse files Browse the repository at this point in the history
…st syntax.
  • Loading branch information
Sacha0 committed Dec 24, 2016
1 parent 44d7677 commit 650afdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/arraymath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function _elementwise{T}(op, ::Type{T}, A::AbstractArray, B::AbstractArray)
return F
end

for f in (:div, :mod, :rem, :&, :|, :xor, :/, :\, :*, :+, :-)
for f in (:div, :mod, :&, :|, :xor, :/, :\, :*, :+, :-)
if f != :/
@eval function ($f){T}(A::Number, B::AbstractArray{T})
R = promote_op($f, typeof(A), T)
Expand Down
4 changes: 4 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1168,4 +1168,8 @@ for (dep, f, op) in [(:sumabs!, :sum!, :abs),
end
end

# Deprecate manually vectorized rem methods in favor of compact broadcast syntax
@deprecate rem(A::Number, B::AbstractArray) rem.(A, B)
@deprecate rem(A::AbstractArray, B::Number) rem.(A, B)

# End deprecations scheduled for 0.6

0 comments on commit 650afdd

Please sign in to comment.