MCPcopy Index your code
hub / github.com/dmlc/dgl / row

Method row

python/dgl/sparse/sparse_matrix.py:73–81  ·  view source on GitHub ↗

Returns the row indices of the non-zero elements. Returns ------- torch.Tensor Row indices of the non-zero elements

(self)

Source from the content-addressed store, hash-verified

71
72 @property
73 def row(self) -> torch.Tensor:
74 """Returns the row indices of the non-zero elements.
75
76 Returns
77 -------
78 torch.Tensor
79 Row indices of the non-zero elements
80 """
81 return self.coo()[0]
82
83 @property
84 def col(self) -> torch.Tensor:

Callers

nothing calls this directly

Calls 1

cooMethod · 0.95

Tested by

no test coverage detected