Skip to content

Commit

Permalink
ErdosRenyi: 0 and 1 are valid probabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeff committed Sep 19, 2017
1 parent 3381687 commit a3bf547
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygsp/graphs/erdosrenyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, N=100, p=0.1, connected=False, directed=False,
max_iter=10, **kwargs):
self.p = p

if not 0 < p < 1:
if not 0 <= p <= 1:
raise ValueError('Probability p should be in [0, 1].')

M = int(N * (N-1) if directed else N * (N-1) / 2)
Expand Down

0 comments on commit a3bf547

Please sign in to comment.