code: def fbm(n, H=0.75):
    
    # TODO more detailed description of fbm
    assert H > 0 and H < 1
  
    def R(t, s):
      twoH = 2 * H
      return 0.5 * (s**twoH + t**twoH - np.abs(t - s)**twoH)
    # form the matrix tau
    gamma = R(*np.mgrid[0:n, 0:n])  # apply R to every element in matrix
    w, P = np.linalg.eigh(gamma)
    L = np.diag(w)
    sigma = np.dot(np.dot(P, np.sqrt(L)), np.linalg.inv(P))
    v = np.random.randn(n)
    return np.dot(sigma, v)
docs: Generates fractional brownian motions of desired length.
  
    Author:
      Christian Thomae
  
    References:
      .. [fbm_1] https://en.wikipedia.org/wiki/Fractional_Brownian_motion#Method_1_of_simulation
  
    Args:
      n (int):
        length of sequence to generate
    Kwargs:
      H (float):
        hurst parameter
  
    Returns:
      array of float:
        simulated fractional brownian motion