

def perform(self, node, inputs, outputs):
    (z,) = outputs
    diag = inputs[0]
    N = len(diag)
    data = diag[:N]
    indices = list(range(N))
    indptr = list(range((N + 1)))
    tup = (data, indices, indptr)
    z[0] = scipy.sparse.csc_matrix(tup, copy=True)

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py SquareDiagonal.perform/original