Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
rossbar committed Apr 8, 2024
1 parent e25fb42 commit bdee20c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
7 changes: 3 additions & 4 deletions doc/reference/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ Glossary
with an edge attribute dictionary `(u, v, dict)`.

ebunch
An iterable container of edge tuples like a list, iterator,
or file.
An iterable of edge tuples like a list, iterator, or file.

edge attribute
Edges can have arbitrary Python objects assigned as attributes
Expand All @@ -25,11 +24,11 @@ Glossary
specified edge *u*-*v*.

nbunch
An nbunch is a single node, container of nodes or `None` (representing
An nbunch is a single node, iterable of nodes, or `None` (representing
all nodes). It can be a list, set, graph, etc. To filter an nbunch
so that only nodes actually in ``G`` appear, use ``G.nbunch_iter(nbunch)``.

If the nbunch is a container or iterable that is not itself a node
If the nbunch is an iterable object that is not itself a node
in the graph, then it will be treated as an iterable of nodes, for
instance, when nbunch is a string or a tuple::

Expand Down
6 changes: 3 additions & 3 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ at a time,
G.add_node(1)
```

or add nodes from any {py:term}`iterable` container, such as a list
or add nodes from any {py:term}`iterable` object, such as a list

```{code-cell}
G.add_nodes_from([2, 3])
```

You can also add nodes along with node
attributes if your container yields 2-tuples of the form
attributes if your iterable yields 2-tuples of the form
`(node, node_attribute_dict)`:

```{code-cell}
Expand Down Expand Up @@ -109,7 +109,7 @@ G.add_edges_from([(1, 2), (1, 3)])
```

or by adding any {term}`ebunch` of edges. An _ebunch_ is any iterable
container of edge-tuples. An edge-tuple can be a 2-tuple of nodes or a 3-tuple
of edge-tuples. An edge-tuple can be a 2-tuple of nodes or a 3-tuple
with 2 nodes followed by an edge attribute dictionary, e.g.,
`(2, 3, {'weight': 3.1415})`. Edge attributes are discussed further
{ref}`below <attributes>`.
Expand Down
5 changes: 2 additions & 3 deletions examples/subclass/plot_antigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ def degree(self, nbunch=None, weight=None):
Parameters
----------
nbunch : iterable container, optional (default=all nodes)
A container of nodes. The container will be iterated
through once.
nbunch : iterable, optional (default=all nodes)
An iterable of nodes that will be iterated through once.
weight : string or None, optional (default=None)
The edge attribute that holds the numerical value used
Expand Down

0 comments on commit bdee20c

Please sign in to comment.