Skip to content

Commit

Permalink
Clean up @vectorize_(1|2)arg deprecations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha0 committed Aug 6, 2016
1 parent 4c61f30 commit 545773a
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,6 @@ end
macro dep_vectorize_2arg(S, f)
S = esc(S)
f = esc(f)
T1 = esc(:T1)
T2 = esc(:T2)
quote
@deprecate $f{T1<:$S,T2<:$S}(x::T1, y::AbstractArray{T2}) $f.(x,y)
@deprecate $f{T1<:$S,T2<:$S}(x::AbstractArray{T1}, y::T2) $f.(x,y)
Expand All @@ -802,10 +800,17 @@ for f in (
:log, :log1p, # base/special/log.jl
:gamma, :lfact, :digamma, :trigamma, :zeta, :eta,# base/special/gamma.jl
:erfcx, :erfi, :dawson, # base/special/erf.jl
:airyprime, :airyai, :airyaiprime, :airybi, :airybiprime, :airy, :airyx, :besselj0, :besselj1, :bessely0, :bessely1, # base/special/bessel.jl
:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :exp, :erf, :erfc, :exp2, :expm1, :exp10, :sin, :cos, :tan, :asin, :acos, :acosh, :atanh, #=:log,=# :log2, :log10, :lgamma, #=:log1p,=# :sqrt, # base/math.jl
:airyprime, :airyai, :airyaiprime, :airybi, :airybiprime, # base/special/bessel.jl
:airy, :airyx, :besselj0, :besselj1, :bessely0, :bessely1, # base/special/bessel.jl
:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :exp, :erf, :erfc, :exp2, # base/math.jl
:expm1, :exp10, :sin, :cos, :tan, :asin, :acos, :acosh, :atanh, # base/math.jl
#=:log,=# :log2, :log10, :lgamma, #=:log1p,=# :sqrt, # base/math.jl
:abs, :abs2, :angle, :isnan, :isinf, :isfinite, # base/floatfuncs.jl
:acos_fast, :acosh_fast, :angle_fast, :asin_fast, :asinh_fast, :atan_fast, :atanh_fast, :cbrt_fast, :cis_fast, :cos_fast, :cosh_fast, :exp10_fast, :exp2_fast, :exp_fast, :expm1_fast, :lgamma_fast, :log10_fast, :log1p_fast, :log2_fast, :log_fast, :sin_fast, :sinh_fast, :sqrt_fast, :tan_fast, :tanh_fast, # base/fastmath.jl
:acos_fast, :acosh_fast, :angle_fast, :asin_fast, :asinh_fast, # base/fastmath.jl
:atan_fast, :atanh_fast, :cbrt_fast, :cis_fast, :cos_fast, # base/fastmath.jl
:cosh_fast, :exp10_fast, :exp2_fast, :exp_fast, :expm1_fast, # base/fastmath.jl
:lgamma_fast, :log10_fast, :log1p_fast, :log2_fast, :log_fast, # base/fastmath.jl
:sin_fast, :sinh_fast, :sqrt_fast, :tan_fast, :tanh_fast, # base/fastmath.jl
:cis, # base/complex.jl
)
@eval @dep_vectorize_1arg Number $f
Expand All @@ -825,8 +830,12 @@ end
@dep_vectorize_1arg Complex float
for f in (
:year, :month, :day, :week, :dayofmonth, :yearmonth, :monthday, :yearmonthday, # base/dates/accessors.jl
:firstdayofweek, :lastdayofweek, :firstdayofmonth, :lastdayofmonth, :firstdayofyear, :lastdayofyear, :firstdayofquarter, :lastdayofquarter, # base/dates/adjusters.jl
:dayname, :dayabbr, :dayofweek, :dayofweekofmonth, :daysofweekinmonth, :monthname, :monthabbr, :daysinmonth, :isleapyear, :dayofyear, :daysinyear, :quarterofyear, :dayofquarter, # base/dates/query.jl
:firstdayofweek, :lastdayofweek, :firstdayofmonth, # base/dates/adjusters.jl
:lastdayofmonth, :firstdayofyear, :lastdayofyear, # base/dates/adjusters.jl
:firstdayofquarter, :lastdayofquarter, # base/dates/adjusters.jl
:dayname, :dayabbr, :dayofweek, :dayofweekofmonth, # base/dates/query.jl
:daysofweekinmonth, :monthname, :monthabbr, :daysinmonth, # base/dates/query.jl
:isleapyear, :dayofyear, :daysinyear, :quarterofyear, :dayofquarter, # base/dates/query.jl
)
@eval @dep_vectorize_1arg Dates.TimeType $f
end
Expand All @@ -841,7 +850,9 @@ end
# Deprecate @vectorize_2arg-vectorized functions from...
for f in (
:polygamma, :zeta, :beta, :lbeta, # base/special/gamma.jl
:airy, :airyx, :besseli, :besselix, :besselj, :besseljx, :besselk, :besselkx, :bessely, :besselyx, :besselh, :besselhx, :hankelh1, :hankelh2, :hankelh1x, :hankelh2x, # base/special/bessel.jl
:airy, :airyx, :besseli, :besselix, :besselj, :besseljx, # base/special/bessel.jl
:besselk, :besselkx, :bessely, :besselyx, :besselh, # base/special/bessel.jl
:besselhx, :hankelh1, :hankelh2, :hankelh1x, :hankelh2x, # base/special/bessel.jl
:log, :hypot, :atan2, # base/math.jl
:pow_fast, :atan2_fast, :hypot_fast, :max_fast, :min_fast, :minmax_fast, # base/fastmath.jl
)
Expand Down

0 comments on commit 545773a

Please sign in to comment.