title: Performing a min() search of a multidimensional array Python, then returning a different part of the array
body: <p>I have a multidimensional array that contains coordinates and their respective distances (computed via pythagorean theorum).</p>
  <pre><code>coords = numpy.array([[3,4,5], [5,12,13], [8,15,17]])
  </code></pre>
  <p>What I would like to do is perform min() on just the last value of the arrays. In the coords array, I'd be looking for the min of 5, 13, and 17. I'd like to avoid creating another list just to store the last values in each array.</p>
  <p>I get that I could just do something along the lines of using a for loop and using the -1 or 2 index, compile all of those, and then run min on that. But my end goal is to return the actual coordinates.</p>
  <p>For example, I'd like to build some function closestPoint which takes a 2d array and outputs the first 2 values of the array which contains the closest coordinates. In my case,</p>
  <pre><code>closestPoint(coords)
  </code></pre>
  <p>returns</p>
  <pre><code>[3,4]
  </code></pre>
  <p>Therefore, I think operating within the array itself is the cleanest way of doing this because then I already have the index of the smallest distance.</p>
  <p>Sorry if there's an incredibly simple answer (which I feel like there should be)… I'm a beginner programmer and mostly self-taught so there's a lot I don't know :/</p>