(self, stdev=0.1, timescale=10.)
Initializes a `BiasedRandomWalk`.

    Args:
      stdev: Float. Standard deviation of the output sequence.
      timescale: Integer. Number of timesteps characteristic of the random walk.
        After `timescale` steps the correlation is reduced by exp(-1). Larger or
        equal to 0, where a value of 0 is an uncorrelated normal distribution.

    Raises:
      ValueError: if either `stdev` or `timescale` is negative.
Initializes a `BiasedRandomWalk`.
Initializes a BiasedRandomWalk .
def __init__(self, stdev=0.1, timescale=10.):
    """Initializes a `BiasedRandomWalk`.

    Args:
      stdev: Float. Standard deviation of the output sequence.
      timescale: Integer. Number of timesteps characteristic of the random walk.
        After `timescale` steps the correlation is reduced by exp(-1). Larger or
        equal to 0, where a value of 0 is an uncorrelated normal distribution.

    Raises:
      ValueError: if either `stdev` or `timescale` is negative.
    """
    if stdev < 0:
      raise ValueError(_NEGATIVE_STDEV.format(stdev))
    if timescale < 0:
      raise ValueError(_NEGATIVE_TIMESCALE.format(timescale))
    elif timescale == 0:
      self._retain = 0.
    else:
      self._retain = np.exp(-1. / timescale)
    self._scale = stdev * np.sqrt(1 - (self._retain * self._retain))
    self._value = 0.0
def __init__ ( self , stdev = 0.1 , timescale = 10. ) : if stdev < 0 : raise ValueError ( _NEGATIVE_STDEV . format ( stdev ) ) if timescale < 0 : raise ValueError ( _NEGATIVE_TIMESCALE . format ( timescale ) ) elif timescale == 0 : self . _retain = 0. else : self . _retain = np . exp ( - 1. / timescale ) self . _scale = stdev * np . sqrt ( 1 - ( self . _retain * self . _retain ) ) self . _value = 0.0