Commit 806ee6e4 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

percolation: solve bug in dual for p=0

parent 1a67a243
......@@ -50,7 +50,7 @@ class Percolation:
Order the vertical edges by (i,j,1); i=1..w+1; j=1..h,
same coordinate as the horizontals.
"""
return np.where(self.rand_array > p, 0, 1)
return np.where(self.rand_array >= p, 0, 1)
def compute_clusters(self, p: float):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment