title: IndexError: fail to coerce slice entry of type tensorvariable to integer
body: <p>I run "ipython debugf.py" and  it gave me  error message as below</p>
  
  <pre><code>IndexError                                Traceback (most recent call last)  
  /home/ml/debugf.py in &lt;module&gt;()  
        8 fff = theano.function(inputs=[index],  
        9                         outputs=cost,  
  ---&gt; 10                         givens={x: train_set_x[index: index+1]})  
  
  IndexError: failed to coerce slice entry of type TensorVariable to integer"   
  </code></pre>
  
  <p>I search the forum and no luck, is there someone can help ?
  thanks!<br>
  debugf.py :  </p>
  
  <pre><code>import theano.tensor as T    
  import theano    
  import numpy    
  index =T.lscalar()    
  x=T.dmatrix()    
  cost=x +index    
  train_set_x=numpy.arange(100).reshape([20,5])    
  fff=theano.function(inputs=[index],    
       outputs=cost,    
       givens={x:train_set_x[index: index+1]})   #&lt;--- Error here    
  </code></pre>