diff --git a/NEWS.md b/NEWS.md index b7a64beb67058..2c87804f5251a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -244,6 +244,9 @@ Deprecated or removed * The operators `|>`, `.>`, `>>`, and `.>>` as used for process I/O redirection are replaced with the `pipe` function ([#5349]). + * `flipud(A)` and `fliplr(A)` have been deprecated in favor of `flipdim(A, 1)` and + `flipdim(A, 2)`, respectively ([#10446]). + Julia v0.3.0 Release Notes ========================== diff --git a/base/abstractarray.jl b/base/abstractarray.jl index f9d635b383e69..fc873f441385f 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -463,9 +463,6 @@ function flipdim(A::AbstractArray, d::Integer) return B end -flipud(A::AbstractArray) = flipdim(A, 1) -fliplr(A::AbstractArray) = flipdim(A, 2) - circshift(a::AbstractArray, shiftamt::Real) = circshift(a, [Integer(shiftamt)]) function circshift{T,N}(a::AbstractArray{T,N}, shiftamts) I = () diff --git a/base/deprecated.jl b/base/deprecated.jl index 993a47104a188..7ec79a3dc5bc8 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -417,6 +417,9 @@ for (f,t) in ((:float32, Float32), (:float64, Float64)) end end +@deprecate flipud(A::AbstractArray) flipdim(A, 1) +@deprecate fliplr(A::AbstractArray) flipdim(A, 2) + # 0.4 discontinued functions @noinline function subtypetree(x::DataType, level=-1) diff --git a/base/dsp.jl b/base/dsp.jl index 3cfd371b5580d..edb92c61fca4e 100644 --- a/base/dsp.jl +++ b/base/dsp.jl @@ -163,7 +163,7 @@ function xcorr(u, v) elseif sv < su v = [v;zeros(eltype(v),su-sv)] end - flipud(conv(flipud(u), v)) + flipdim(conv(flipdim(u, 1), v), 1) end fftshift(x) = circshift(x, div([size(x)...],2)) diff --git a/base/exports.jl b/base/exports.jl index 3936dd6890416..07fe6b9b3b4a2 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -519,8 +519,6 @@ export findnz, first, flipdim, - fliplr, - flipud, gradient, hcat, hvcat, diff --git a/doc/stdlib/arrays.rst b/doc/stdlib/arrays.rst index 47772fc22134c..65e3d96095139 100644 --- a/doc/stdlib/arrays.rst +++ b/doc/stdlib/arrays.rst @@ -267,14 +267,6 @@ Indexing, Assignment, and Concatenation Reverse ``A`` in dimension ``d``. -.. function:: flipud(A) - - Equivalent to ``flipdim(A,1)``. - -.. function:: fliplr(A) - - Equivalent to ``flipdim(A,2)``. - .. function:: circshift(A,shifts) Circularly shift the data in an array. The second argument is a vector giving the amount to shift in each dimension.