title: Much different result when using numba
body: <p>I have here pure python code, except just making a NumPy array. My problem here is that the result I get is completely wrong when I use @jit, but when I remove it its good. Could anyone give me any tips on why this is? Thank you.</p>
  <pre><code>@jit
  def grayFun(image: np.array) -&gt; np.array:
        
      gray_image = np.empty_like(image)
      
      
      for i in range(image.shape[0]):
          for j in range(image.shape[1]):
              gray = gray_image[i][j][0]*0.21 + gray_image[i][j][1]*0.72 + gray_image[i][j][2]*0.07
              gray_image[i][j] = (gray,gray,gray)
      
      gray_image = gray_image.astype(&quot;uint8&quot;)
      return gray_image
  </code></pre>