Maximum value of certain element of all arrays in np array
<p>I have a numpy array with arrays within it:</p>

<pre><code>array([[1,2,3],[4,5,6],[7,8,9]])
</code></pre>

<p>How am I able to find the maximum of all of the last elements of these inner arrays?  ie. for this case the return would be 9 <code>(max(3,6,9))</code></p>

<p>I'm able to do this by converting to a Pandas dataframe first, but this is slowing down the program and I'm sure there's an easier way just using np.</p>

<p>Assuming that you meant to write</p>

<pre><code>array([[1,2,3],[4,5,6],[7,8,9]])
</code></pre>

<p>then you can slice the last column with <code>A[:,-1]</code> and call <code>.max()</code>.</p>

python numpy