1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-22 16:05:27 +01:00

better info in sparsify!

This commit is contained in:
kalmarek 2019-02-21 21:10:36 +01:00
parent d31933a02f
commit d69e33629b
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -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)