2 import matplotlib
.pyplot
as plt
9 limit
= math
.floor(length
/n
)
16 last_zero_interval
= n
18 tracker
= [0 for x
in range(n
+1)]
20 for i
in range(0,length
):
22 if(i
>= last_zero
+ last_zero_interval
):
28 while(prev_val
== rand
or tracker
[rand
] >= limit
or rand
> n
):
29 rand
= random
.randint(1,n
)
34 tracker
[rand
] = tracker
[rand
] + 1
39 plt
.hist(X
, bins
=n
+1) # arguments are passed to np.histogram