Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MridulS committed Dec 14, 2023
1 parent 6c7f40f commit 751c695
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion networkx/algorithms/chordal.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def _find_chordality_breaker(G, s=None, treewidth_bound=sys.maxsize):
if nx.number_of_selfloops(G) > 0:
raise nx.NetworkXError("Input graph is not chordal.")
if len(G) == 0:
raise nx.NetworkXError("Graph has no nodes.")
raise nx.NetworkXPointlessConcept("Graph has no nodes.")
unnumbered = set(G)
if s is None:
s = arbitrary_element(G)
Expand Down
2 changes: 1 addition & 1 deletion networkx/algorithms/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def is_aperiodic(G):
if not G.is_directed():
raise nx.NetworkXError("is_aperiodic not defined for undirected graphs")
if len(G) == 0:
raise nx.NetworkXError("Graph has no nodes.")
raise nx.NetworkXPointlessConcept("Graph has no nodes.")
s = arbitrary_element(G)
levels = {s: 0}
this_level = [s]
Expand Down
2 changes: 1 addition & 1 deletion networkx/algorithms/distance_regular.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def intersection_array(G):
"""
# test for regular graph (all degrees must be equal)
if len(G) == 0:
raise nx.NetworkXError("Graph has no nodes.")
raise nx.NetworkXPointlessConcept("Graph has no nodes.")
degree = iter(G.degree())
(_, k) = next(degree)
for _, knext in degree:
Expand Down
2 changes: 1 addition & 1 deletion networkx/algorithms/regular.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def is_regular(G):
"""
if len(G) == 0:
raise nx.NetworkXError("Graph has no nodes.")
raise nx.NetworkXPointlessConcept("Graph has no nodes.")
n1 = nx.utils.arbitrary_element(G)
if not G.is_directed():
d1 = G.degree(n1)
Expand Down

0 comments on commit 751c695

Please sign in to comment.