Did I find the right examples for you? yes no

All Samples(55)  |  Call(55)  |  Derive(0)  |  Import(0)

src/p/y/pymaclab-0.95.9/pymaclab/dsge/solvers/modsolvers.py   pymaclab(Download)
            VV1 = MAT.kron(MAT.transpose(NN),FF)+MAT.kron(MAT.identity(k_exog),FF*PP+GG)
            VV2 = MAT.kron(MAT.transpose(NN),JJ)+MAT.kron(MAT.identity(k_exog),KK)
            VV = MAT.hstack((VV1,VV2))
        else:
            RR = -CC_plus*(AA*PP+BB)
            VV1 = MAT.kron(MAT.identity(k_exog),AA)
            VV2 = MAT.kron(MAT.identity(k_exog),CC)
            VV3 = MAT.kron(MAT.transpose(NN),FF)+MAT.kron(MAT.identity(k_exog),FF*PP+JJ*RR+GG)
            VV4 = MAT.kron(MAT.transpose(NN),JJ)+MAT.kron(MAT.identity(k_exog),KK)
            VV = MAT.vstack((MAT.hstack((VV1,VV2)),MAT.hstack((VV3,VV4))))
 
        LLNN_plus_MM = LL*NN+MM
        NON = MAT.hstack((DD.flatten(1),LLNN_plus_MM.flatten(1)))
        try:
            QQSS_vec = -(VV.I*MAT.transpose(NON))
        except MyErr:
            print 'Error: Matrix VV is not invertible!'
        QQ = QQSS_vec[0:m_states*k_exog,:].reshape(-1,m_states).transpose()
        SS = QQSS_vec[(m_states*k_exog):((m_states+n_endog)*k_exog),:].reshape(-1,n_endog).transpose()
        WW1 = MAT.hstack((MAT.identity(m_states),MAT.zeros((m_states,k_exog))))