Skip to content

Commit

Permalink
Fix message in UndefKeywordError message for dropdims
Browse files Browse the repository at this point in the history
  • Loading branch information
galenlynch committed Aug 16, 2018
1 parent ce9bb7b commit 2f62400
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ end

# https://github.com/JuliaLang/julia/pull/28303
if VERSION < v"0.7.0-beta2.143"
dropdims(X; dims = throw(UndefKeywordError("cat: keyword argument dims not assigned"))) = squeeze(X, dims)
dropdims(X; dims = throw(UndefKeywordError("dropdims: keyword argument dims not assigned"))) = squeeze(X, dims)
end

include("deprecated.jl")
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,6 @@ let a = rand(5,5)
end

# 0.7.0-beta2.143
@test isdefined(Compat, :dropdims)
if VERSION < v"0.7.0-beta2.143"
let a = reshape(Vector(1:4),(2,2,1,1)), b = reshape(Vector(1:4), (2,2,1))
@test Compat.dropdims(a; dims=3) == b
Expand Down

0 comments on commit 2f62400

Please sign in to comment.