Skip to content

Commit

Permalink
Drop compat code for findall from #466 (and #467).
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent e65b355 commit 4338acb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ Currently, the `@compat` macro supports the following syntaxes:
* `module_name`, `Base.function_name`, and `Base.datatype_name` are now methods of a
new function called `nameof` ([#25622]).

* `find` is now `findall` ([#25545]).

* `search` is now `findfirst`/`findnext` and `rsearch` is now `findlast`/`findprev`,
sometimes combined with `isequal` or `in` ([#24673], [#26436]).

Expand Down
6 changes: 0 additions & 6 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ end
end
end

# 0.7.0-DEV.3415
if !isdefined(Base, :findall)
const findall = find
export findall
end

@static if !isdefined(Base, :argmin)
if VERSION >= v"0.7.0-DEV.1660" # indmin/indmax return key
const argmin = indmin
Expand Down
3 changes: 3 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -636,3 +636,6 @@ let c = CartesianIndices((1:3, 1:2)), l = LinearIndices((1:3, 1:2))
@test l[vec(c)] == collect(1:6)
@test CartesianIndex(1, 1) in CartesianIndices((3, 4))
end

# 0.7.0-DEV.3415
@test findall(x -> x==1, [1, 2, 3, 2, 1]) == [1, 5]
3 changes: 0 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ end
@test argmin(Dict(:z=>10, :y=>12, :x=>9, :w=>11)) == :x
@test argmin((1.0, -3, 0.f0)) == 2

# 0.7.0-DEV.3415
@test findall(x -> x==1, [1, 2, 3, 2, 1]) == [1, 5]

module TestPkg
using Compat
using Compat.Pkg
Expand Down

0 comments on commit 4338acb

Please sign in to comment.