1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-14 14:15:28 +01:00

let sparsify actually return sparse matrix

This commit is contained in:
kalmarek 2017-11-08 10:00:34 +01:00
parent 2aa82db1ac
commit fe1e9ee37c

View File

@ -94,10 +94,10 @@ function sparsify!{T}(M::AbstractArray{T}, eps=eps(T); check=false, verbose=fals
info(logger, "Sparsified density:", rpad(densM, 20), "", rpad(dens(M),20))
end
return M
return sparse(M)
end
sparsify{T}(U::AbstractArray{T}, tol=eps(T)) = sparsify!(deepcopy(U), tol)
sparsify{T}(U::AbstractArray{T}, tol=eps(T); check=true, verbose=false) = sparsify!(deepcopy(U), tol, check=check, verbose=verbose)
function init_orbit_data(logger, sett::Settings; radius=2)