title: Theano subtraction when you can't tile
body: <p>Say we have a theano matrix X that is nxm, and another one u that is nx1.  We want to do <code>X-u</code>, but if we do that we'll get an input dimension mismatch.  We could try tiling u, but tile only accepts constants and not variables.  How do we do this?</p>
  
  <pre><code>import theano
  import theano.tensor as T
  
  X, u = T.dmatrices("X", "u")
  T.addbroadcast(u, 1)
  r = X - u
  f = theano.function([X, u], r)
  f([[1], [0]], [[1]])
  </code></pre>
  
  <p>I then get the error <code>('Bad input argument to theano function with name "&lt;stdin&gt;:1"  at index 0(0-based)', 'Wrong number of dimensions: expected 2, got 1 with shape (2,).')
  </code></p>