title: simple calculation in scipy: minima
body: <pre><code>import numpy as np
  from scipy import signal
  
  data = np.array([[[*3, 2, 1, np.nan, np.nan],
                [22, 1, 1, 4, 4],
                [4, 2, 3, 3, 4],
                [1, 1, 4, 1, 5],
                [2, 4, 5, 2, 1]],
  
               [[*6, 7, 10, 6, np.nan],
                [np.nan, 7, 8, 6, 9],
                [6, 10, 9, 8, 10],
                [6, 8, 7, 10, 8],
                [10, 9, 9, 10, 8]],
  
               [[*6, 7, 10, np.nan, np.nan],
                [19, 19, 8, 6, 9],
                [6, 10, 9, 8, 10],
                [6, 8, 7, 10, 8],
                [10, 9, 9, 10, 8]],
  
               [[*6, 7, 10, 6, np.nan],
                [19, 21, 8, 6, 9],
                [6, 10, 9, 8, 10],
                [6, 8, 7, 10, 8],
                [10, 9, 9, 10, 8]],
  
               [[*12, 14, 12, 15, np.nan],
                [19, 11, 14, 14, 11],
                [13, 13, 16, 15, 11],
                [14, 15, 14, 16, 14],
                [13, 15, 11, 11, 14]]])
  </code></pre>
  
  <p>I want to calculate minima. 
  One minima from five elements which are shown with asterix, and so on. Hence, there will be 25 minima values which are to resulted in 5*5 array size.
  I tried as follows:</p>
  
  <pre><code>data = data.reshape(5,25)
  minima = data[signal.argrelmin(data,axis=0,order=1)]
  print minima
  </code></pre>
  
  <p>But, following error. Any idea please.</p>
  
  <pre><code>IndexError: arrays used as indices must be of integer (or boolean) type
  </code></pre>