def _random(self, sigma, mu, size):
Implement a Gaussian random walk as a cumulative sum of normals.
rv = stats.norm(mu, sigma)
return rv.rvs(size).cumsum(axis=0)
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
After Change
def _random(self, sigma, mu, size):
Implement a Gaussian random walk as a cumulative sum of normals.
rv = stats.norm(mu, sigma)
data = rv.rvs(size).cumsum(axis=0)data = data - data[0] // TODO: this should be a draw from `init`, if available
return data
def _repr_latex_(self, name=None, dist=None):