Я получил то, что ожидал.Не знаете, кто из них главный: 4995 или 5005?
print(y[0])
print(y[1])
4995
5005
Вот еще код, объясняющий ваше подбрасывание:
from scipy.stats import binom
data_binom = binom.rvs(n=1,p=0.5,size=10000)
heads = 0
tails = 0
edges = 0
count = 0
for coin in data_binom:
count += 1
if coin == 1:
heads += 1
elif coin == 0:
tails += 1
else:
edges += 1
print("Observed " + str(count) + " of coin tossing with heads " + str(heads)
+ ", tails " + str(tails) + ", and edges " + str(edges))
Результаты четырех тестов:
$ python3.7 test.py
Observed 10000 of coin tossing with heads 4989, tails 5011, and edges 0
$ python3.7 test.py
Observed 10000 of coin tossing with heads 5109, tails 4891, and edges 0
$ python3.7 test.py
Observed 10000 of coin tossing with heads 4968, tails 5032, and edges 0
$ python3.7 test.py
Observed 10000 of coin tossing with heads 5046, tails 4954, and edges 0