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
b0c76d48
Unverified
Commit
b0c76d48
authored
Dec 03, 2018
by
Lingfan Yu
Committed by
GitHub
Dec 03, 2018
Browse files
[Bug] fix __slots__ in view.py (#230)
parent
b98dc92c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
python/dgl/view.py
python/dgl/view.py
+4
-4
No files found.
python/dgl/view.py
View file @
b0c76d48
...
...
@@ -25,7 +25,7 @@ class NodeView(object):
--------
TBD
"""
__slot__
=
'_graph'
__slot
s
__
=
[
'_graph'
]
def
__init__
(
self
,
graph
):
self
.
_graph
=
graph
...
...
@@ -48,7 +48,7 @@ class NodeView(object):
return
F
.
arange
(
0
,
len
(
self
))
class
NodeDataView
(
MutableMapping
):
__slot__
=
[
'_graph'
,
'_nodes'
]
__slot
s
__
=
[
'_graph'
,
'_nodes'
]
def
__init__
(
self
,
graph
,
nodes
):
self
.
_graph
=
graph
...
...
@@ -79,7 +79,7 @@ class NodeDataView(MutableMapping):
EdgeSpace
=
namedtuple
(
'EdgeSpace'
,
[
'data'
])
class
EdgeView
(
object
):
__slot__
=
[
'_graph'
]
__slot
s
__
=
[
'_graph'
]
def
__init__
(
self
,
graph
):
self
.
_graph
=
graph
...
...
@@ -102,7 +102,7 @@ class EdgeView(object):
return
self
.
_graph
.
all_edges
(
*
args
,
**
kwargs
)
class
EdgeDataView
(
MutableMapping
):
__slot__
=
[
'_graph'
,
'_edges'
]
__slot
s
__
=
[
'_graph'
,
'_edges'
]
def
__init__
(
self
,
graph
,
edges
):
self
.
_graph
=
graph
...
...
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