def patternbroadcast(x, broadcastable):
 rval = Rebroadcast(*[(i, broadcastable[i]) for i in xrange(len(broadcastable))])(x)
 return theano.tensor.opt.apply_rebroadcast_opt(rval)

def patternbroadcast ( x , broadcastable ) : rval = Rebroadcast ( * [ ( i , broadcastable [ i ] ) for i in xrange ( len ( broadcastable ) ) ] ) ( x ) return theano . tensor . opt . apply_rebroadcast_opt ( rval )
make the input adopt a specific broadcasting pattern .