Skip to content

Commit

Permalink
Update uniform.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nwlandry committed Oct 9, 2024
1 parent 4d57ab7 commit 93c7e81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xgi/generators/uniform.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def uniform_erdos_renyi_hypergraph(n, m, p, p_type="prob", multiedges=False, see
if q > 1 or q < 0:
raise XGIError("Probability not in [0, 1].")

if q == 1:
if q == 1 and not multiedges:
return complete_hypergraph(n, order=m - 1)
if q == 0:
H = empty_hypergraph()
Expand All @@ -392,7 +392,6 @@ def uniform_erdos_renyi_hypergraph(n, m, p, p_type="prob", multiedges=False, see
index = np.random.geometric(q) - 1 # -1 b/c zero indexing
if multiedges:
max_index = n**m

f = _index_to_edge_prod
else:
max_index = comb(n, m, exact=True)
Expand Down

0 comments on commit 93c7e81

Please sign in to comment.