In https://lectures.quantecon.org/py/python_by_example.html I think there is an error because realisations of uniform(0,1) random variables cannot be smaller than 0 or larger that 1.

def generate_data(n, generator_type):

ϵ_values = []

for i in range(n):

if generator_type == ‘U’:

e = np.random.uniform(0, 1)

else:

e = np.random.randn()

ϵ_values.append(e)

return ϵ_values

data = generate_data(100, ‘U’)

plt.plot(data)

plt.show()

Not very important. Cheers.