“>”在scipy.sparse中对于coo_矩阵上的操作意味着什么?

2024-06-10 06:29:07 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在与“>;”作斗争在scipy.sparse coo_矩阵中

adj = sp.coo_matrix((np.ones(edges.shape[0]), (edges[:, 0], edges[:, 1])), shape=(labels.shape[0], labels.shape[0]), dtype=np.float32)

# build symmetric adjacency matrix
```adj = adj + adj.T.multiply(adj.T > adj) - adj.multiply(adj.T > adj)```

As what you see, there is a ` > `. I hope to know what it means. 

Tags: gtlabelsnpones矩阵scipywhatmatrix