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
7ff2662b
Unverified
Commit
7ff2662b
authored
Jan 21, 2021
by
Mufei Li
Committed by
GitHub
Jan 21, 2021
Browse files
[Fix] Better Error Message for node_type_subgraph (#2554)
* Update * Update * Update
parent
9d90faf0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/dgl/subgraph.py
python/dgl/subgraph.py
+2
-0
No files found.
python/dgl/subgraph.py
View file @
7ff2662b
...
...
@@ -543,6 +543,8 @@ def node_type_subgraph(graph, ntypes):
for
stid
,
dtid
,
etid
in
zip
(
stids
,
dtids
,
etids
):
if
stid
in
ntid
and
dtid
in
ntid
:
etypes
.
append
(
graph
.
canonical_etypes
[
etid
])
if
len
(
etypes
)
==
0
:
raise
DGLError
(
'There are no edges among nodes of the specified types.'
)
return
edge_type_subgraph
(
graph
,
etypes
)
DGLHeteroGraph
.
node_type_subgraph
=
utils
.
alias_func
(
node_type_subgraph
)
...
...
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