def unconstrain_stationary_multivariate(constrained, error_variance):
 from scipy import linalg
 use_list = (type(constrained) == list)
 if (not use_list):
  (k_endog, order) = constrained.shape
  order //= k_endog
  constrained = [constrained[:k_endog, (i * k_endog):((i + 1) * k_endog)] for i in range(order)]
 else:
  order = len(constrained)
  k_endog = constrained[0].shape[0]
 partial_autocorrelations = _compute_multivariate_pacf_from_coefficients(constrained, error_variance, order, k_endog)
 unconstrained = _unconstrain_sv_less_than_one(partial_autocorrelations, order, k_endog)
 if (not use_list):
  unconstrained = np.concatenate(unconstrained, axis=1)
 return (unconstrained, error_variance)

def unconstrain_stationary_multivariate ( constrained , error_variance ) : from scipy import linalg use_list = ( type ( constrained ) == list ) if ( not use_list ) : ( k_endog , order ) = constrained . shape order //= k_endog constrained = [ constrained [ : k_endog , ( i * k_endog ) : ( ( i + 1 ) * k_endog ) ] for i in range ( order ) ] else : order = len ( constrained ) k_endog = constrained [ 0 ] . shape [ 0 ] partial_autocorrelations = _compute_multivariate_pacf_from_coefficients ( constrained , error_variance , order , k_endog ) unconstrained = _unconstrain_sv_less_than_one ( partial_autocorrelations , order , k_endog ) if ( not use_list ) : unconstrained = np . concatenate ( unconstrained , axis = 1 ) return ( unconstrained , error_variance )
transform constrained parameters used in likelihood evaluation to unconstrained parameters used by the optimizer parameters constrained : array or list constrained parameters of .