Skip to content

Commit

Permalink
squeeze is now dropdims
Browse files Browse the repository at this point in the history
`squeeze` was renamed `dropdims` in [#28303](JuliaLang/julia#28303)

Fixes JuliaLang#617
  • Loading branch information
galenlynch committed Aug 16, 2018
1 parent cec0d8b commit 9303f7d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ Currently, the `@compat` macro supports the following syntaxes:

* `atan2` is now a 2-argument method of `atan` ([#27253]).

* `squeeze` is now `dropdims` ([#28303]).
## New macros

* `@__DIR__` has been added ([#18380])
Expand Down Expand Up @@ -668,3 +669,4 @@ includes this fix. Find the minimum version from there.
[#27711]: https://github.com/JuliaLang/julia/issues/27711
[#27828]: https://github.com/JuliaLang/julia/issues/27828
[#27834]: https://github.com/JuliaLang/julia/issues/27834
[#28303]: https://github.com/JuliaLang/julia/issues/28303
5 changes: 5 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2004,6 +2004,11 @@ if VERSION < v"0.7.0-beta.73"
mapslices(f, A, dims)
end

# https://github.com/JuliaLang/julia/pull/28303
if VERSION < v"0.7.0-beta2.143"
const dropdims = squeeze
end

include("deprecated.jl")

end # module Compat
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1930,4 +1930,7 @@ let a = rand(5,5)
end
end

# 0.7.0-beta2.143
@test isdefined(Compat, :dropdims)

nothing

0 comments on commit 9303f7d

Please sign in to comment.