Is it possible to turn the following Python code loop into code without loops in Python?
steps = 10000
rho = 0.9
e = np.random.randn(steps)
y = [0]
# Possible to get rid of this loop?
for i in range(len(e)):
y.append(rho*y[i] + e[i])
The code is to generate simple autoregressive (order 1) time series where given some starting value, every next value is rho time previous plus some random noise.