title: Error only integer scalar arrays can be converted to a scalar index
body: <p>I am using Python 3.6.</p>
  
  <p>I am trying to do:</p>
  
  <pre><code>import numpy as np
  
  def run_11(x):
  return x+1
  
  kk = np.arange(1, 17)
  
  for i in range (kk):
       ind = run_11(i)
       print (i)
       print (ind)
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>TypeError: only integer scalar arrays can be converted to a scalar index</p>
  </blockquote>
  
  <p>I couldn't figure why and how to solve it. any advice would be greatly appreciated</p>