diff --git a/README.md b/README.md index 4d2a0cc5f..757a9868d 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `squeeze` is now `dropdims` ([#28303], [#26660]). -* `repmat` is now `repeat` ([#26039]) - ## New macros ## Other changes diff --git a/src/Compat.jl b/src/Compat.jl index 453ad5418..adba4b025 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -76,12 +76,6 @@ end end end -if VERSION < v"0.7.0-DEV.3977" #26039 - Base.repeat(A::AbstractArray, counts::Integer...) = Base.repeat(A, outer = counts) - Base.repeat(a::AbstractVecOrMat, m::Integer, n::Integer=1) = Base.repmat(a, m, n) - Base.repeat(a::AbstractVector, m::Integer) = Base.repmat(a, m) -end - if VERSION < v"0.7.0-DEV.2337" # qr doesn't take the full keyword anymore since 0.7.0-DEV.5211; we still support it # here to avoid unneccesary breakage diff --git a/test/old.jl b/test/old.jl index bb9adc41e..46f4c5c5e 100644 --- a/test/old.jl +++ b/test/old.jl @@ -1040,3 +1040,11 @@ let A = rand(5,5) @test IndexStyle(selectdim(B, 2, 1)) == IndexStyle(view(B, :, 1, :)) == IndexCartesian() @test IndexStyle(selectdim(B, 3, 1)) == IndexStyle(view(B, :, :, 1)) == IndexLinear() end + +@test repeat([1, 2], 3) == [1, 2, 1, 2, 1, 2] +@test repeat(1:4, 2) == [1, 2, 3, 4, 1, 2, 3, 4] +@test repeat([1 2; 3 4], 2, 3) == [1 2 1 2 1 2 + 3 4 3 4 3 4 + 1 2 1 2 1 2 + 3 4 3 4 3 4] +@test repeat([1, 2], 1, 2, 3) == [x for x in 1:2, y in 1:2, z in 1:3] diff --git a/test/runtests.jl b/test/runtests.jl index 05e6576d2..b9feb29ca 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -351,14 +351,6 @@ if VERSION < v"0.7.0-beta2.143" end end -@test repeat([1, 2], 3) == [1, 2, 1, 2, 1, 2] -@test repeat(1:4, 2) == [1, 2, 3, 4, 1, 2, 3, 4] -@test repeat([1 2; 3 4], 2, 3) == [1 2 1 2 1 2 - 3 4 3 4 3 4 - 1 2 1 2 1 2 - 3 4 3 4 3 4] -@test repeat([1, 2], 1, 2, 3) == [x for x in 1:2, y in 1:2, z in 1:3] - # Support for positional `stop` @test Compat.range(0, 5, length = 6) == 0.0:1.0:5.0 @test Compat.range(0, 10, step = 2) == 0:2:10