title: numpy get the index of a specific value, occuring after a given index
body: <p>I got the following numpy array</p>
  <pre><code>print(data)
  
  Out: array([[[94 32 63]
    [56 19 48]
    [29 11 45]
    [15 29 33]]
  
   [[60 16 57]
    [26 36 62]
    [29 56 88]
    [96 66 75]]
  
   [[83 52 66]
    [28  9 95]
    [88 86 69]
    [26 78 56]]
  
   [[84 29 98]
    [83  0 38]
    [87 11 71]
    [27 51 37]]
  
   [[11 25  5]
    [19 10 13]
    [ 8 21  3]
    [ 7  5  1]]])
  
  </code></pre>
  <p>I would like to find where (at which index) I have the closest value to 50% of max along axis 0, the value here in <code>decay_value</code></p>
  <pre><code>max_value = np.max(data, axis=0)
  threshold_decay = 0.5
  decay_value = max_value*threshold_decay
  </code></pre>
  <p>But I would like to search it in the slice of the array <strong>after</strong> (at higher position) the position of the maximum</p>
  <p>So basically after the value expressed by the <code>index</code> as below</p>
  <pre><code>index = np.argmax(data, axis=0)
  print (index)
  
  Out:array([[0 2 3]
             [3 1 2]
             [2 2 1]
             [1 2 1]])
  
  </code></pre>
  <p>The code below allows me to get the position of the closest value to <code>threshold_decay</code>
  but of course that could occur at whatever index position, even before (at lower position) the index of the maximum value.</p>
  <pre><code>difference_dummy = np.absolute(data - decay_value)
  index_decay = np.argmin(data, axis=0)
  print(index_decay)
  
  Out: array([[4, 1, 4],
              [4, 3, 4],
              [4, 0, 4],
              [4, 4, 4]])
  </code></pre>
  <p>Indeed the results I'm looking at would be the following</p>
  <pre><code>Out: array([[4, 4, 4],
              [4, 3, 4],
              [4, 4, 4],
              [4, 4, 4]])
  </code></pre>
  <p>As the matrix I'm  working with could be quite large I would appreciate any <em>pythonic</em> solution without loops</p>