numpy.random.randint() / choice() / binomial()
# import numpy
import numpy as np
1. Two fair coin flips produce exactly two heads
# simulate 1 million tests of two fair coin flips
tests = np.random.randint(2, size=(int(1e5), 2))
# sums of all te...
原创
2019-02-02 09:48:48 ·
518 阅读 ·
0 评论