import matplotlib.pyplot as plt
numargs = generic.numargs
[ <shape(s)> ] = ['Replace with resonable value', ]*numargs

# Display frozen pmf:

rv = generic(<shape(s)>)
x = np.arange(0, np.min(rv.dist.b, 3)+1)
h = plt.plot(x, rv.pmf(x))

# Check accuracy of cdf and ppf:

prb = generic.cdf(x, <shape(s)>)
h = plt.semilogy(np.abs(x-generic.ppf(prb, <shape(s)>))+1e-20)

# Random number generation:

R = generic.rvs(<shape(s)>, size=100)

# Custom made discrete distribution:

vals = [arange(7), (0.1, 0.2, 0.3, 0.1, 0.1, 0.1, 0.1)]
custm = rv_discrete(name='custm', values=vals)
h = plt.plot(vals[0], custm.pmf(vals[0]))
