Skip to content

Commit 0388309

Browse files
committed
Drop compat code for mapslices from #588
1 parent 9de49e6 commit 0388309

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ Currently, the `@compat` macro supports the following syntaxes:
6868

6969
* `range` supporting `stop` as positional argument ([#28708]).
7070

71-
* `mapslices` with `dims` keyword argument ([#27828]).
72-
7371
* `hasproperty` and `hasfield` ([#28850]).
7472
`hasproperty` is defined only for Julia 0.7 or later.
7573

src/Compat.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,6 @@ end
8282
end
8383
end
8484

85-
# https://github.com/JuliaLang/julia/pull/27828
86-
if VERSION < v"0.7.0-beta.73"
87-
Base.mapslices(f, A::AbstractArray; dims=error("required keyword argument `dims` missing")) =
88-
mapslices(f, A, dims)
89-
end
90-
9185
# https://github.com/JuliaLang/julia/pull/28302
9286
if VERSION < v"0.7.0-beta2.169"
9387
const floatmin = realmin

test/old.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,3 +1254,13 @@ let
12541254
@test Compat.split(str, r"\.+:\.+"; limit=3, keepempty=false) == ["a","ba","cba.:.:.dcba.:."]
12551255
@test Compat.split(str, r"\.+:\.+"; limit=3, keepempty=true) == ["a","ba","cba.:.:.dcba.:."]
12561256
end
1257+
1258+
# 0.7.0-beta.73
1259+
let a = rand(5,5)
1260+
s = mapslices(sort, a, dims=[1])
1261+
S = mapslices(sort, a, dims=[2])
1262+
for i = 1:5
1263+
@test s[:,i] == sort(a[:,i])
1264+
@test vec(S[i,:]) == sort(vec(a[i,:]))
1265+
end
1266+
end

test/runtests.jl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,6 @@ let
9898
@test_throws UndefKeywordError func5(x=2)
9999
end
100100

101-
# 0.7.0-beta.73
102-
let a = rand(5,5)
103-
s = mapslices(sort, a, dims=[1])
104-
S = mapslices(sort, a, dims=[2])
105-
for i = 1:5
106-
@test s[:,i] == sort(a[:,i])
107-
@test vec(S[i,:]) == sort(vec(a[i,:]))
108-
end
109-
end
110-
111101
# 0.7.0-beta2.169
112102
@test floatmin(Float16) == @eval $(Core.Intrinsics.bitcast(Float16, 0x0400))
113103
@test floatmax(Float32) == @eval $(Core.Intrinsics.bitcast(Float32, 0x7f7fffff))

0 commit comments

Comments
 (0)