title: DeprecationWarning: object of type <class 'float'> cannot be safely interpreted as an integer
body: <p>My code snippet is as follows:</p>
  
  <pre><code>data,l = make_moons(100000)
  s = np.random.permutation(100000);
  temp1 = data[s[0:200],:] # Random Sampling of 200 columns 
  temp2 = cdist(data,temp1) # Pairwise distance between two sets of observations
  C = np.exp(-temp2/sig)
  W = C[s[0:200],:]
  </code></pre>
  
  <p>where make_moons is defined as:</p>
  
  <pre><code>from math import pi
  
  def make_moons(n):
      """Create a 'two moons' dataset with n feature vectors, 
          and 2 features per vector."""
  
      assert n%2==0, 'n must be even'
      # create upper moon
      theta = np.linspace(-pi / 2, pi / 2, n/2)
      # create lower moon
      x = np.r_[np.sin(theta) - pi / 4, np.sin(theta)]
      y = np.r_[np.cos(theta), -np.cos(theta) + .5]
      data = np.c_[x, y]
      # Add some noise
      data = data + 0.03 * np.random.standard_normal(data.shape)
  
      # create labels
      labels = np.r_[np.ones((n//2, 1)), -np.ones((n//2, 1))]
      labels = labels.ravel().astype(np.int32)
  
      return data,labels
  </code></pre>
  
  <p>I want to get some insight into the captioned warning. As I see, the arrays are floating type but why are they interpreted (or need to be) as integer? </p>