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
f1542b9d
Unverified
Commit
f1542b9d
authored
Nov 20, 2019
by
Mufei Li
Committed by
GitHub
Nov 20, 2019
Browse files
Fix (#1019)
parent
d2afe65c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/dgl/convert.py
python/dgl/convert.py
+2
-2
No files found.
python/dgl/convert.py
View file @
f1542b9d
...
...
@@ -590,8 +590,8 @@ def to_homo(G):
srctype
,
_
,
dsttype
=
etype
src
,
dst
=
G
.
all_edges
(
etype
=
etype
,
order
=
'eid'
)
num_edges
=
len
(
src
)
srcs
.
append
(
src
+
offset_per_ntype
[
G
.
get_ntype_id
(
srctype
)])
dsts
.
append
(
dst
+
offset_per_ntype
[
G
.
get_ntype_id
(
dsttype
)])
srcs
.
append
(
src
+
int
(
offset_per_ntype
[
G
.
get_ntype_id
(
srctype
)])
)
dsts
.
append
(
dst
+
int
(
offset_per_ntype
[
G
.
get_ntype_id
(
dsttype
)])
)
etype_ids
.
append
(
F
.
full_1d
(
num_edges
,
etype_id
,
F
.
int64
,
F
.
cpu
()))
eids
.
append
(
F
.
arange
(
0
,
num_edges
))
...
...
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