title: Python deprecation warning involving floats and integers
body: <p>I want to select a small part of a large array and find the average value of that subset. I have tried to specify integers when defining the subset:</p>
  
  <pre><code>import numpy as np
  
  x = np.linspace(-10,10,1e6) # whole dataset
  
  x0 = x[int(len(x)//2-5):int(len(x)//2+5)] # subset
  print(x0)
  xm = np.mean(x0) # average value of data subset
  print(xm)
  </code></pre>
  
  <p>but my code gives a deprecation warning that says:</p>
  
  <pre><code>DeprecationWarning: object of type &lt;class 'float'&gt; cannot be safely interpreted as an integer.
    x = np.linspace(-10,10,1e6)
  </code></pre>
  
  <p>Is there a better way of calculating the average of the data subset? What should I do about this warning and will it become a problem in newer versions of Python? I'm using Spyder 3.2.8. </p>