小编Pre*_*Ven的帖子

ValueError:行数必须是正整数,而不是 3.0

我有这个代码:

\n
import numpy as np\nfrom scipy import stats\nfrom matplotlib import pyplot as plt\n\nif __name__ == "__main__":\n    # Create a list of the number of coin tosses ("Bernoulli trials")\n    number_of_trials = [0, 2, 10, 20, 50, 500]\n    # Conduct 500 coin tosses and output into a list of 0s and 1s\n    # where 0 represents a tail and 1 represents a head\n    data = stats.bernoulli.rvs(0.5, size=number_of_trials[-1])\n    # Discretise the x-axis into 100 separate plotting points\n    x = np.linspace(0, 1, 100)\n …
Run Code Online (Sandbox Code Playgroud)

python statistics matplotlib scipy

3
推荐指数
1
解决办法
4696
查看次数

标签 统计

matplotlib ×1

python ×1

scipy ×1

statistics ×1