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

build symmetric adjacency matrix #36

Open
amitiwari opened this issue Oct 22, 2018 · 1 comment
Open

build symmetric adjacency matrix #36

amitiwari opened this issue Oct 22, 2018 · 1 comment

Comments

@amitiwari
Copy link

Hi,

Just curious about this line in utils/load_data
adj = adj + adj.T.multiply(adj.T > adj) - adj.multiply(adj.T > adj)

Seems like it fails due to the comparison which makes it boolean. Is it even needed ? As I see it , the adjacency matrix is already symmetric with a shape of (2708, 2708).

@tkipf
Copy link
Owner

tkipf commented Oct 27, 2018

Yes, the adjacency matrix is "symmetric" in shape, but it is not necessarily a symmetric matrix (i.e., A^T = A). Maybe try a different python/numpy version or add an explicit conversion to float if you get an error. Feel free to submit a pull request with a fix.

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

No branches or pull requests

2 participants