def unconstrain_stationary_univariate(constrained):
 n = constrained.shape[0]
 y = np.zeros((n, n), dtype=constrained.dtype)
 y[(n - 1):] = (- constrained)
 for k in range((n - 1), 0, (-1)):
  for i in range(k):
   y[((k - 1), i)] = ((y[(k, i)] - (y[(k, k)] * y[(k, ((k - i) - 1))])) / (1 - (y[(k, k)] ** 2)))
 r = y.diagonal()
 x = (r / ((1 - (r ** 2)) ** 0.5))
 return x

def unconstrain_stationary_univariate ( constrained ) : n = constrained . shape [ 0 ] y = np . zeros ( ( n , n ) , dtype = constrained . dtype ) y [ ( n - 1 ) : ] = ( - constrained ) for k in range ( ( n - 1 ) , 0 , ( - 1 ) ) : for i in range ( k ) : y [ ( ( k - 1 ) , i ) ] = ( ( y [ ( k , i ) ] - ( y [ ( k , k ) ] * y [ ( k , ( ( k - i ) - 1 ) ) ] ) ) / ( 1 - ( y [ ( k , k ) ] ** 2 ) ) ) r = y . diagonal ( ) x = ( r / ( ( 1 - ( r ** 2 ) ) ** 0.5 ) ) return x
transform constrained parameters used in likelihood evaluation to unconstrained parameters used by the optimizer parameters constrained : array constrained parameters of .