summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Barnowski <rossbar@berkeley.edu>2022-05-14 04:00:13 -0700
committerGitHub <noreply@github.com>2022-05-14 15:00:13 +0400
commit9d65173822623e6d93eb2a6dae5720fc475a061e (patch)
tree6902d8e9e1975119f10220eb746e91a2730dd03b
parent124ba266e5a52ee88b05dc4f0b0fa642e4a2d6bf (diff)
downloadnetworkx-9d65173822623e6d93eb2a6dae5720fc475a061e.tar.gz
Rm unnecessary input validation from moral_graph. (#5638)
-rw-r--r--networkx/algorithms/moral.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/networkx/algorithms/moral.py b/networkx/algorithms/moral.py
index 8e51ba31..f5ec5a6d 100644
--- a/networkx/algorithms/moral.py
+++ b/networkx/algorithms/moral.py
@@ -49,9 +49,6 @@ def moral_graph(G):
In Proceedings of the Eleventh conference on Uncertainty
in artificial intelligence (UAI'95)
"""
- if G is None:
- raise ValueError("Expected NetworkX graph!")
-
H = G.to_undirected()
for preds in G.pred.values():
predecessors_combinations = itertools.combinations(preds, r=2)