Did I find the right examples for you? yes no

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

src/p/y/pymaclab-0.95.9/pymaclab/dsge/solvers/modsolvers.py   pymaclab(Download)
 
 
        d_Delta_up = MAT.diag(Delta_up)
        d_Xi_up = MAT.diag(Xi_up)
        Xi_eigval = MAT.zeros(N.shape(Delta_up))
        gg = self.G
        count = 0
        for varia in MAT.diag(sigma):
            if locals().has_key('ranvec'):
                if count in indx:
        if shockvec == None:
            count = 0
            for varia in MAT.diag(sigma):
                if locals().has_key('ranvec'):
                    if count in indx:

src/d/o/dolo-0.4.6.3/dolo/numeric/extern/qz.py   dolo(Download)
from numpy import mat, c_, r_, where, sqrt, newaxis
from numpy.linalg import solve
from numpy.matlib import diag
import sys
 
def qzdiv(stake, A2, B2, Q, Z):
    Aout = A2.copy(); Bout = B2.copy(); Qout = Q.copy(); Zout = Z.copy()
    n, jnk = A2.shape
    # remember diag returns 1d
    root = mat(abs(c_[diag(A2)[:,newaxis], diag(B2)[:,newaxis]]))

src/d/o/dolo-HEAD/dolo/numeric/extern/qz.py   dolo(Download)
from numpy import mat, c_, r_, where, sqrt, newaxis
from numpy.linalg import solve
from numpy.matlib import diag
import sys
 
def qzdiv(stake, A2, B2, Q, Z):
    Aout = A2.copy(); Bout = B2.copy(); Qout = Q.copy(); Zout = Z.copy()
    n, jnk = A2.shape
    # remember diag returns 1d
    root = mat(abs(c_[diag(A2)[:,newaxis], diag(B2)[:,newaxis]]))