@@ -20,7 +20,7 @@ class MemoryGraphList(list):
20
20
r"""Class to store a list of graph dictionaries in memory.
21
21
22
22
Inherits from a python list. The graph properties are defined by tensor-like (numpy) arrays
23
- for indices, attributes, labels, symbol etc. in :obj:`GraphDict`, which are the items of the list.
23
+ for indices, attributes, labels, symbol etc. in :obj:`GraphDict` , which are the items of the list.
24
24
Access to items via `[]` indexing operator.
25
25
26
26
A python list of a single named property can be obtained from each :obj:`GraphDict` in :obj:`MemoryGraphList` via
@@ -68,7 +68,7 @@ def validate(self):
68
68
self [i ] = GraphDict (x )
69
69
70
70
def assign_property (self , key : str , value : list ):
71
- """Assign a list of numpy arrays of a property to :obj:`GraphDict` s in this list.
71
+ """Assign a list of numpy arrays of a property to the respective :obj:`GraphDict` s in this list.
72
72
73
73
Args:
74
74
key (str): Name of the property.
@@ -81,7 +81,7 @@ def assign_property(self, key: str, value: list):
81
81
# We could also here remove the key from all graphs.
82
82
return self
83
83
if not isinstance (value , list ):
84
- raise TypeError ("Expected type ' list' to assign graph properties." )
84
+ raise TypeError ("Expected type ` list` to assign graph properties." )
85
85
if len (self ) == 0 :
86
86
self .empty (len (value ))
87
87
if len (self ) != len (value ):
@@ -123,7 +123,7 @@ def __getitem__(self, item) -> Union[GraphDict, List]:
123
123
124
124
def __setitem__ (self , key , value ):
125
125
if not isinstance (value , GraphDict ):
126
- raise TypeError ("Require a GraphDict as list item." )
126
+ raise TypeError ("Require a ` GraphDict` as list item." )
127
127
super (MemoryGraphList , self ).__setitem__ (key , value )
128
128
129
129
def __repr__ (self ):
0 commit comments