def test_update_equiv(self):
        # Like test_update_same, but the update expression is simplified until
        # it is found to be equal to the original variable
        a = shared(1., 'a')
        b = shared(numpy.ones((2, 3)), 'b')

        # See comment in test_update_same about why we try both
        # shared variables.
        f = theano.function([], [], updates=[(a, a), (b, (2 * b - b))])
        g = theano.function([], [], updates=[(a, (a - a * 2)), (b, b)])

        f()
        assert a.get_value(borrow=True).shape == (), a.get_value()
        assert b.get_value(borrow=True).shape == (2, 3), b.get_value()
        g()
        assert a.get_value(borrow=True).shape == (), a.get_value()
        assert b.get_value(borrow=True).shape == (2, 3), b.get_value()
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/compile/tests/test_pfunc.py/Test_pfunc.test_update_equiv/swapped operands of `-`