Skip to content

Commit

Permalink
Drop compat code for permutedims from #582
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 2881e77 commit 452cf1f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ Currently, the `@compat` macro supports the following syntaxes:

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

* Single-argument `permutedims(x)` for matrices and vectors ([#24839]).

* `mapslices` with `dims` keyword argument ([#27828]).

* `hasproperty` and `hasfield` ([#28850]).
Expand Down
5 changes: 0 additions & 5 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ end
end
end

if VERSION < v"0.7.0-DEV.2956" # julia#24839
Base.permutedims(A::AbstractMatrix) = permutedims(A, (2,1))
Base.permutedims(v::AbstractVector) = reshape(v, (1, length(v)))
end

# https://github.com/JuliaLang/julia/pull/27253
@static if VERSION < v"0.7.0-alpha.44"
Base.atan(x::Real, y::Real) = atan2(x, y)
Expand Down
4 changes: 4 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1210,3 +1210,7 @@ end
@test something(Some(2)) === 2
@test something(Some(2), 1) === 2
@test something(nothing, Some(1)) === 1

# julia#24839
@test permutedims([1 2; 3 4]) == [1 3; 2 4]
@test permutedims([1,2,3]) == [1 2 3]
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ end
@test length(Compat.CartesianIndices((1:2,))) == 2
@test length(Compat.CartesianIndices((1:2, -1:1))) == 6

# julia#24839
@test permutedims([1 2; 3 4]) == [1 3; 2 4]
@test permutedims([1,2,3]) == [1 2 3]

# 0.7.0-alpha.44
@test atan(1, 2) == atan(0.5)
@test atan(1.0, 2.0) == atan(0.5)
Expand Down

0 comments on commit 452cf1f

Please sign in to comment.