Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
751685a9
Unverified
Commit
751685a9
authored
Jul 07, 2021
by
Quan (Andy) Gan
Committed by
GitHub
Jul 07, 2021
Browse files
[Doc] Add documentation for DGLGraph.adj_sparse (#3096)
Co-authored-by:
Minjie Wang
<
wmjlyjemaine@gmail.com
>
parent
188152b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
docs/source/api/python/dgl.DGLGraph.rst
docs/source/api/python/dgl.DGLGraph.rst
+1
-0
python/dgl/heterograph.py
python/dgl/heterograph.py
+2
-0
No files found.
docs/source/api/python/dgl.DGLGraph.rst
View file @
751685a9
...
...
@@ -143,6 +143,7 @@ Methods for getting the adjacency and the incidence matrix of the graph.
:toctree: ../../generated/
DGLGraph.adj
DGLGraph.adj_sparse
DGLGraph.adjacency_matrix
DGLGraph.inc
DGLGraph.incidence_matrix
...
...
python/dgl/heterograph.py
View file @
751685a9
...
...
@@ -3619,7 +3619,9 @@ class DGLHeteroGraph(object):
--------
>>> g = dgl.graph(([0, 1, 2], [1, 2, 3]))
>>> g.adj_sparse('coo')
(tensor([0, 1, 2]), tensor([1, 2, 3]))
>>> g.adj_sparse('csr')
(tensor([0, 1, 2, 3, 3]), tensor([1, 2, 3]), tensor([0, 1, 2]))
"""
etid
=
self
.
get_etype_id
(
etype
)
if
fmt
==
'csc'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment