@@ -112,11 +112,8 @@ def __init__(self, graphs=None, edge_types=None, **attr):
112
112
def __str__ (self ):
113
113
"""Returns a short summary of the graph.
114
114
115
- Returns
116
- -------
117
- info : string
118
- Graph information including the graph name (if any), graph type, and the
119
- number of nodes and edges.
115
+ Graph information including the graph name (if any), graph type, and the
116
+ number of nodes and edges.
120
117
121
118
Examples
122
119
--------
@@ -263,10 +260,11 @@ def has_node(self, n):
263
260
Parameters
264
261
----------
265
262
n : node
263
+ The node to query. Identical to ``n in G``.
266
264
267
265
Returns
268
266
-------
269
- has : bool
267
+ has : bool
270
268
Whether or not the graph has node 'n'.
271
269
272
270
Examples
@@ -289,11 +287,6 @@ def has_node(self, n):
289
287
def number_of_nodes (self ):
290
288
"""Returns the number of nodes in the graph.
291
289
292
- Returns
293
- -------
294
- nnodes : int
295
- The number of nodes in the graph.
296
-
297
290
See Also
298
291
--------
299
292
order: identical method
@@ -310,11 +303,6 @@ def number_of_nodes(self):
310
303
def order (self ):
311
304
"""Returns the number of nodes in the graph.
312
305
313
- Returns
314
- -------
315
- nnodes : int
316
- The number of nodes in the graph.
317
-
318
306
See Also
319
307
--------
320
308
number_of_nodes: identical method
@@ -348,10 +336,7 @@ def clear_edge_types(self):
348
336
def __iter__ (self ):
349
337
"""Iterate over the nodes. Use: 'for n in G'.
350
338
351
- Returns
352
- -------
353
- niter : iterator
354
- An iterator over all nodes in the graph.
339
+ An iterator over all nodes in the graph.
355
340
356
341
Examples
357
342
--------
@@ -380,11 +365,6 @@ def __contains__(self, n):
380
365
def __len__ (self ):
381
366
"""Returns the number of nodes in the graph. Use: 'len(G)'.
382
367
383
- Returns
384
- -------
385
- nnodes : int
386
- The number of nodes in the graph.
387
-
388
368
See Also
389
369
--------
390
370
number_of_nodes: identical method
@@ -402,15 +382,7 @@ def __len__(self):
402
382
def __getitem__ (self , n ):
403
383
"""Returns a dict of neighbors of node n. Use: 'G[n]'.
404
384
405
- Parameters
406
- ----------
407
- n : node
408
- A node in the graph.
409
-
410
- Returns
411
- -------
412
- adj_dict : dictionary
413
- The adjacency dictionary for nodes connected to n.
385
+ The adjacency dictionary for nodes connected to n.
414
386
415
387
Notes
416
388
-----
@@ -1093,7 +1065,7 @@ def degree(self, nbunch=None, weight=None):
1093
1065
1094
1066
Returns
1095
1067
-------
1096
- deg_dicts : dictionary of DegreeView or int
1068
+ deg_dicts : dictionary of DegreeView | int
1097
1069
If multiple nodes are requested (the default), returns a ``DegreeView``
1098
1070
mapping nodes to their degree.
1099
1071
If a single node is requested, returns the degree of the node as an integer.
@@ -1120,7 +1092,6 @@ def size(self, weight=None, edge_type="all"):
1120
1092
size : float
1121
1093
The number of edges or
1122
1094
(if weight keyword is provided) the total weight sum.
1123
-
1124
1095
If weight is None, returns an int. Otherwise a float
1125
1096
(or more general numeric if the weights are more general).
1126
1097
0 commit comments