title: TypeError: 'float' object has no attribute '__getitem__' in defined function
body: <p>I get this error message 
  TypeError: 'float' object has no attribute '<strong>getitem</strong>'
  In my previous model runs the same strategy has worked perfectly,
  so I couldnt figure out whats the difference. </p>
  
  <pre><code>r = 0.8 
  K1 = 100 
  K2 = 50 
  q = 1 
  E = r 
  l = 0.5 
  d = 100. 
  b1 = 0.05 
  b2 = 0.05 
  p = 50. 
  c = 300. 
  
  i = np.arange(0.,1.01,0.01)
  OUTX = np.zeros(i.shape[0])
  
  def I_test(r, K1, K2, E, l, d, b1, b2, p, c, q):
      I= (1/b1*(d-p)) + ((K1- E*q*l/r)* E*q*l + (1/b1)* np.log(p/d)) + ((1-np.exp(-b2*E*q*(1-l)*(K2-E*q*(1-l)/r)/b2))) - c - c*E
      return I
  
  for i in np.arange(0,i.shape[0]):
      I = I_test(r, K1, K2, E[i], l, d, b1, b2, p, c, q)
      OUTX[i]= I[i]
  </code></pre>