title: Python, distance between two points type issue
body: <p>I am trying to use a simple approximation for a solution to the travelling salesman problem for 100 random points on a Cartesian grid between values of 0 - 100 on both the x and y axis using the <strong>numpy</strong> method.</p>
  
  <p>I have created various integers that are unique and fill up three lists:</p>
  
  <pre><code>xList = [np.round(np.random.rand()*100)] #Generates random x,y coordinates
  yList = [np.round(np.random.rand()*100)]
  orderList = [np.round(np.random.rand()*100)]
  </code></pre>
  
  <p>I have defined a function that will find the shortest distance between two points on a Cartesian plane:</p>
  
  <pre><code>def distance(x1, x2, y1, y2):
      return np.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2))
  </code></pre>
  
  <p>I then iterate through this list to find the total length if a specific path travels randomly between points:</p>
  
  <pre><code>totalLength = 0
  
  for i in range(0, 98):
      stuff = distance(int(xList[orderList[i]]), int(xList[orderList[i+1]]), int(yList[orderList[i]]), int(yList[orderList[i+1]]))
  totalLength = totalLength + stuff
  
  shortestLength = totalLength
  </code></pre>
  
  <p>It seems that the typing is a problem for my predefined function getting the message:</p>
  
  <pre><code>stuff = distance(int(xList[orderList[i]]), int(xList[orderList[i+1]]), int(yList[orderList[i]]), int(yList[orderList[i+1]]))***
  
  TypeError: list indices must be integers, not numpy.float64
  </code></pre>
  
  <p>I have no idea about how to properly define types in python so I would like some advice about converting the <code>float.numpy64</code> type to an integer or allowing my predefined function to work for the correct types.</p>