<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># Draw samples from the distribution:

import numpy as np
s = np.random.poisson(5, 10000)

# Display histogram of the sample:

import matplotlib.pyplot as plt
count, bins, ignored = plt.hist(s, 14, normed=True)
plt.show()

# Draw each 100 values for lambda 100 and 500:

s = np.random.poisson(lam=(100., 500.), size=(100, 2))
</pre></body></html>