resolve type instability in splaplacian

This commit is contained in:
kalmar 2017-03-13 11:20:24 +01:00
parent fd1eb40e29
commit 0ff1ddd985
1 changed files with 2 additions and 2 deletions

View File

@ -34,10 +34,10 @@ end
function splaplacian_coeff(S, basis, n=length(basis))
result = spzeros(n)
result[1] = length(S)
result[1] = float(length(S))
for s in S
ind = findfirst(basis, s)
result[ind] += -1
result[ind] += -1.0
end
return result
end