Skip to content

Commit 6ffb652

Browse files
committed
Deprecate flipud() and fliplr() in favor of flipdim()
We do not provide other convenience functions for any other operation, like size(), and these names are obscure for non-MATLAB users.
1 parent b80f7db commit 6ffb652

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

base/deprecated.jl

+3
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ const base64 = base64encode
294294
# 10314
295295
@deprecate filter!(r::Regex, d::Dict) filter!((k,v)->ismatch(r,k), d)
296296

297+
@deprecate flipud(A::AbstractArray) flipdim(A, 1)
298+
@deprecate fliplr(A::AbstractArray) flipdim(A, 2)
299+
297300
# 0.4 discontinued functions
298301

299302
@noinline function subtypetree(x::DataType, level=-1)

base/dsp.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function xcorr(u, v)
163163
elseif sv < su
164164
v = [v;zeros(eltype(v),su-sv)]
165165
end
166-
flipud(conv(flipud(u), v))
166+
flip(conv(flip(u, 1), v), 1)
167167
end
168168

169169
fftshift(x) = circshift(x, div([size(x)...],2))

0 commit comments

Comments
 (0)