Skip to content

Commit

Permalink
Fix deprecations of #23812 for sparse find methods
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Sep 29, 2017
1 parent 5da628f commit 8e5c7f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/sparse/sparsematrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ dropzeros(A::SparseMatrixCSC, trim::Bool = true) = dropzeros!(copy(A), trim)

function find(S::SparseMatrixCSC)
if !(eltype(S) <: Bool)
depwarn("In the future `find(A)` will only work on boolean collections. Use `find(x->x!=0, A)` instead.", :find)
Base.depwarn("In the future `find(A)` will only work on boolean collections. Use `find(x->x!=0, A)` instead.", :find)
end
return find(x->x!=0, S)
end
Expand Down
2 changes: 1 addition & 1 deletion base/sparse/sparsevector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ end

function find(x::SparseVector)
if !(eltype(x) <: Bool)
depwarn("In the future `find(A)` will only work on boolean collections. Use `find(x->x!=0, A)` instead.", :find)
Base.depwarn("In the future `find(A)` will only work on boolean collections. Use `find(x->x!=0, A)` instead.", :find)
end
return find(x->x!=0, x)
end
Expand Down

0 comments on commit 8e5c7f9

Please sign in to comment.