SciPy - Statistical Functions (scipy.stats) Basics
Identify the error in the following code snippet:
from scipy.stats import binom samples = binom.rvs(n=10, p=0.5, size='5')
from scipy.stats import binom samples = binom.rvs(n=10, p=0.5, size='5')
rvssize parameter expects an integer or tuple of integers, not a string.size='5' is a string, which will cause a TypeError.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions