Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect type assumption with int() #79

Closed
sbromberger opened this issue Feb 9, 2015 · 0 comments · Fixed by #172 or #179
Closed

Incorrect type assumption with int() #79

sbromberger opened this issue Feb 9, 2015 · 0 comments · Fixed by #172 or #179

Comments

@sbromberger
Copy link

function lmatrix(g::Graph)
    n_v = nv(g)
    A = int(adjacency_matrix(g))   # note that this creates a sparse matrix of integers
    D = spdiagm(sum(A,2)[:])
    return D - A
end

yields

ERROR  sum: ErrorException("no method found for the specified argument types")
                                         Signature: (Int64,Int64)

Also curiously, it doesn't warn that I'm not using n_v.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant