def _unconstrain_sv_less_than_one(constrained, order=None, k_endog=None):
 from scipy import linalg
 unconstrained = []
 if (order is None):
  order = len(constrained)
 if (k_endog is None):
  k_endog = constrained[0].shape[0]
 eye = np.eye(k_endog)
 for i in range(order):
  P = constrained[i]
  (B_inv, lower) = linalg.cho_factor((eye - np.dot(P, P.T)), lower=True)
  unconstrained.append(linalg.solve_triangular(B_inv, P, lower=lower))
 return unconstrained

def _unconstrain_sv_less_than_one ( constrained , order = None , k_endog = None ) : from scipy import linalg unconstrained = [ ] if ( order is None ) : order = len ( constrained ) if ( k_endog is None ) : k_endog = constrained [ 0 ] . shape [ 0 ] eye = np . eye ( k_endog ) for i in range ( order ) : P = constrained [ i ] ( B_inv , lower ) = linalg . cho_factor ( ( eye - np . dot ( P , P . T ) ) , lower = True ) unconstrained . append ( linalg . solve_triangular ( B_inv , P , lower = lower ) ) return unconstrained
transform matrices with singular values less than one to arbitrary matrices .