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

In utils.py line 36, wouldnt adj = adj + (adj.T > adj) also work? #71

Open
ltbd78 opened this issue Jan 12, 2021 · 2 comments
Open

In utils.py line 36, wouldnt adj = adj + (adj.T > adj) also work? #71

ltbd78 opened this issue Jan 12, 2021 · 2 comments

Comments

@ltbd78
Copy link

ltbd78 commented Jan 12, 2021

No description provided.

@gordonrust
Copy link

I tried using this, I find the two give me the same adj_matrix

adj_smpl = adj + (adj.T > adj).astype('int').astype('float
adj_kpf = adj + adj.T.multiply(adj.T > adj) - adj.multiply(adj.T > adj)
(adj_smpl != adj_kpf).nnz == 0 --> gives True (https://stackoverflow.com/questions/30685024/check-if-two-scipy-sparse-csr-matrix-are-equal)

@guanrenyang
Copy link

I also found this problem.
I think adj.multiply(adj.T > adj) returns a zero matrix.
I want to ask what is the effect of subtracting this item?

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

3 participants