def _compute_multivariate_pacf_from_coefficients(constrained, error_variance, order=None, k_endog=None):
 if (type(constrained) == list):
  order = len(constrained)
  k_endog = constrained[0].shape[0]
 else:
  (k_endog, order) = constrained.shape
  order //= k_endog
 _acovf = _compute_multivariate_acovf_from_coefficients
 autocovariances = [autocovariance.T for autocovariance in _acovf(constrained, error_variance, maxlag=order)]
 return _compute_multivariate_pacf_from_autocovariances(autocovariances)

def _compute_multivariate_pacf_from_coefficients ( constrained , error_variance , order = None , k_endog = None ) : if ( type ( constrained ) == list ) : order = len ( constrained ) k_endog = constrained [ 0 ] . shape [ 0 ] else : ( k_endog , order ) = constrained . shape order //= k_endog _acovf = _compute_multivariate_acovf_from_coefficients autocovariances = [ autocovariance . T for autocovariance in _acovf ( constrained , error_variance , maxlag = order ) ] return _compute_multivariate_pacf_from_autocovariances ( autocovariances )
transform matrices corresponding to a stationary process to matrices with singular values less than one .