mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-14 14:15:28 +01:00
better info in sparsify!
This commit is contained in:
parent
d31933a02f
commit
d69e33629b
@ -108,14 +108,10 @@ end
|
||||
|
||||
function sparsify!(M::AbstractArray{T}, eps=eps(T); verbose=false) where T
|
||||
densM = dens(M)
|
||||
if verbose
|
||||
@info("Sparsifying $(size(M))-matrix... ")
|
||||
end
|
||||
|
||||
clamp_small!(M, eps)
|
||||
|
||||
if verbose
|
||||
@info("$(rpad(densM, 20)) → $(rpad(dens(M),20))), ($(count(!iszero, M)) non-zeros)")
|
||||
@info("Sparsifying $(size(M))-matrix... \n $(rpad(densM, 20)) → $(rpad(dens(M),20))), ($(count(!iszero, M)) non-zeros)")
|
||||
end
|
||||
|
||||
return sparse(M)
|
||||
|
Loading…
Reference in New Issue
Block a user