mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-12-26 10:35:29 +01:00
sparsify prints only to stdout
This commit is contained in:
parent
f7534c2b97
commit
6affa6876f
@ -80,7 +80,7 @@ function sparsify!{Tv,Ti}(M::SparseMatrixCSC{Tv,Ti}, eps=eps(Tv); verbose=false)
|
|||||||
m = nnz(M)
|
m = nnz(M)
|
||||||
|
|
||||||
if verbose
|
if verbose
|
||||||
info(LOGGER, "Sparsified density:", rpad(densM, 20), " → ", rpad(dens(M), 20))
|
info("Sparsified density:", rpad(densM, 20), " → ", rpad(dens(M), 20))
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
@ -92,11 +92,11 @@ function sparsify!{T}(M::AbstractArray{T}, eps=eps(T); check=false, verbose=fals
|
|||||||
M[abs.(M) .< eps] .= zero(T)
|
M[abs.(M) .< eps] .= zero(T)
|
||||||
|
|
||||||
if check && rankM != rank(M)
|
if check && rankM != rank(M)
|
||||||
warn(LOGGER, "Sparsification decreased the rank!")
|
warn("Sparsification decreased the rank!")
|
||||||
end
|
end
|
||||||
|
|
||||||
if verbose
|
if verbose
|
||||||
info(LOGGER, "Sparsified density:", rpad(densM, 20), " → ", rpad(dens(M),20))
|
info("Sparsified density:", rpad(densM, 20), " → ", rpad(dens(M),20))
|
||||||
end
|
end
|
||||||
|
|
||||||
return sparse(M)
|
return sparse(M)
|
||||||
|
Loading…
Reference in New Issue
Block a user