def trans_O_4x4_3x3(Mw, minimal=False, trans=False):
    if minimal:

        T0 = np.empty((4,6))
        T1 = np.empty((4,4))

        for O, I in ((T0, Mw), (T1, T0.T)):

            t0 =  I[1,:] + I[2,:]
            t1 =  I[3,:] + I[4,:]
            t2 =  I[1,:] - I[2,:]
            t3 =  I[3,:] - I[4,:]

            O[0,:] = t0 + t1     + I[0,:]
            O[1,:] = t2 + t3*2.0
            O[2,:] = t0 + t1*4.0
            O[3,:] = t2 + t3*8.0 + I[5,:]

        return T1.T

    else:
        return np.dot( np.dot(O_4x4_3x3[trans[0]], Mw), O_4x4_3x3[trans[1]].T )
dataset/ETHPy150Open NervanaSystems/neon/neon/backends/winograd4.py/trans_O_4x4_3x3/original