Simplify theano expression