title: theano T.switch(): if tensor is empty strange behaviour
body: <p>i want to check if vector <code>A is empty: return [0] else: return A</code></p>
  
  <pre><code>import theano
  import theano.tensor as T
  
  A = T.ivector()
  
  out = T.switch( T.eq(A.size, 0), [0], A )
  
  f = theano.function([A], out)
  
  print f([1])
  print f([])
  </code></pre>
  
  <p>this prints:</p>
  
  <pre><code>[ 1 ]
  []
  </code></pre>
  
  <p>the conditional statement by itself works, it only returns 1 if A is empty.</p>