title: Numba does not speed up my code
body: <p>I am trying to speed up a part of my code using Numba. But, it does not work properly. Actually, I don't see any improvement! Can anybody give me some advice how to fix it?</p>
  
  <p>By the way, all the input variables are 1D/2D/3D numpy variables</p>
  
  <pre><code>import numba as nb
  @nb.jit 
  def Permutation(Spect, Blob_Len, Fs, alpha, Terminate,
                      x, y, z, Per_IndexH1, Per_IndexH2, P_Value, MeanSpect, TempPVal, Boundary): 
  
    for i in range(Terminate):
  
        TempPVal[:] = 0.0
        DS1 = Spect[:, :, Per_IndexH1[i, 0 : Boundary]]
        DS2 = Spect[:, :, Per_IndexH2[i, Boundary:]]
        MS1 = np.sum(DS1, axis = 2)
        MS2 = np.sum(DS2, axis = 2)
  
        TempPVal[np.abs(MS1 - MS2) &gt; MeanSpect] = 1
        P_Value = P_Value + TempPVal
  
  
    P_Value = P_Value / Terminate 
    return P_Value
  </code></pre>