Skip to content

Commit

Permalink
Fix depwarns with fkeep!
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsch committed Apr 3, 2024
1 parent cedc040 commit ed46e50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/filtrations/rips.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,13 @@ function Rips{I}(
if issparse(adj)
adj isa SparseMatrixCSC ||
throw(ArgumentError("only SparseMatrixCSC sparse matrices supported"))
SparseArrays.fkeep!(adj, (_, _, v) -> v thresh)

# This is janky, but using the deprecated syntax prints depwarns in the docstrings.
if VERSION v"1.9.0-DEV"
SparseArrays.fkeep!((_, _, v) -> v thresh, adj)
else
SparseArrays.fkeep!(adj, (_, _, v) -> v thresh)
end
end
return Rips{I,T,typeof(adj)}(adj, thresh)
end
Expand Down

0 comments on commit ed46e50

Please sign in to comment.