Skip to content

Commit fab9ee1

Browse files
Merge branch 'master' into mh/reduce_init
2 parents a2defdc + a4c6f22 commit fab9ee1

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ os:
44
- osx
55
julia:
66
- 0.6
7+
- 0.7
78
- nightly
89
notifications:
910
email: false

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ Currently, the `@compat` macro supports the following syntaxes:
308308
* `something` to get the first argument different from `nothing`, unwrapping those
309309
of the `Some` type ([#27258]).
310310

311+
* `mapslices` with `dims` keyword argument ([#27828]).
312+
311313
## Renaming
312314

313315
* `Display` is now `AbstractDisplay` ([#24831]).
@@ -662,3 +664,4 @@ includes this fix. Find the minimum version from there.
662664
[#27401]: https://github.com/JuliaLang/julia/issues/27401
663665
[#27711]: https://github.com/JuliaLang/julia/issues/27711
664666
[#27834]: https://github.com/JuliaLang/julia/issues/27834
667+
[#27828]: https://github.com/JuliaLang/julia/issues/27828

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ environment:
33
matrix:
44
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
55
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
6+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
7+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
68
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
79
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
810

src/Compat.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,12 @@ end
19741974
Base.split(s, splitter; limit=limit, keep=keepempty)
19751975
end
19761976

1977+
# https://github.com/JuliaLang/julia/pull/27828
1978+
if VERSION < v"0.7.0-beta.73"
1979+
Base.mapslices(f, A::AbstractArray; dims=error("required keyword argument `dims` missing")) =
1980+
mapslices(f, A, dims)
1981+
end
1982+
19771983
include("deprecated.jl")
19781984

19791985
end # module Compat

test/runtests.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,4 +1896,14 @@ let
18961896
@test Compat.split(str, r"\.+:\.+"; limit=3, keepempty=true) == ["a","ba","cba.:.:.dcba.:."]
18971897
end
18981898

1899+
# 0.7.0-beta.73
1900+
let a = rand(5,5)
1901+
s = mapslices(sort, a, dims=[1])
1902+
S = mapslices(sort, a, dims=[2])
1903+
for i = 1:5
1904+
@test s[:,i] == sort(a[:,i])
1905+
@test vec(S[i,:]) == sort(vec(a[i,:]))
1906+
end
1907+
end
1908+
18991909
nothing

0 commit comments

Comments
 (0)