sparsify for sparse arrays
This commit is contained in:
parent
8ce128d926
commit
806d9c822c
@ -53,6 +53,7 @@ function sparsify!{T}(U::SparseMatrixCSC{T}, eps=eps(T))
|
|||||||
return U
|
return U
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sparsify{T}(U::SparseMatrixCSC{T}, eps=eps(T)) = sparsify!(deepcopy(U), eps)
|
||||||
small_to_zero!{T}(A::AbstractArray{T}, eps=eps(T)) = A[abs(A) .< eps] = zero(T)
|
small_to_zero!{T}(A::AbstractArray{T}, eps=eps(T)) = A[abs(A) .< eps] = zero(T)
|
||||||
|
|
||||||
function init_model(Uπs)
|
function init_model(Uπs)
|
||||||
|
Loading…
Reference in New Issue
Block a user