Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docstring of nonisomorphic_trees. #7255

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 14 additions & 16 deletions networkx/generators/nonisomorphic_trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,20 @@ def nonisomorphic_trees(order, create="graph"):
Parameters
----------
order : int
order of the desired tree(s)

create : graph or matrix (default="Graph)
If graph is selected a list of trees will be returned,
if matrix is selected a list of adjacency matrix will
be returned

Returns
-------
G : List of NetworkX Graphs

M : List of Adjacency matrices

References
----------

order of the desired tree(s)

create : one of {"graph", "matrix"} (default="graph")
If ``"graph"`` is selected a list of ``Graph`` instances will be returned,
if matrix is selected a list of adjacency matrices will be returned.

Yields
------
list
A list of nonisomorphic trees, in one of two formats depending on the
value of the `create` parameter:
- ``create="graph"``: yields a list of `networkx.Graph` instances
- ``create="matrix"``: yields a list of list-of-lists representing
adjacency matrices
"""

if order < 2:
Expand Down