title: How to stop deprecation warning?
body: <p>My function has to be jit compiled, but I get the following deprecation warning:</p>
  <p>How can I solve this, so the issue is fixed? (so that i dont have to be afraid of the function not working properly in the future)</p>
  <pre><code>e_labeling.py:418: NumbaWarning: 
  Compilation is falling back to object mode WITH looplifting enabled because Function &quot;get_result&quot; failed type inference due to: non-precise type array(pyobject, 1d, C)
  During: typing of argument at D:/Arc/Arc_Project\Architecture\_3_Labeling\CRV_Weighted_Score_labeling.py (422)
  
  File &quot;..\_3_Labeling\CRV_Weighted_Score_labeling.py&quot;, line 422:
      def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result):
          &lt;source elided&gt;
          
          for i in prange(len_result):
          ^
  
    @nb.jit
  D:/Arc/Arc_Project\Architecture\_3_Labeling\CRV_Weighted_Score_labeling.py:418: NumbaWarning: 
  Compilation is falling back to object mode WITHOUT looplifting enabled because Function &quot;get_result&quot; failed type inference due to: cannot determine Numba type of &lt;class 'numba.core.dispatcher.LiftedLoop'&gt;
  
  File &quot;..\_3_Labeling\CRV_Weighted_Score_labeling.py&quot;, line 422:
      def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result):
          &lt;source elided&gt;
          
          for i in prange(len_result):
          ^
  
    @nb.jit
  c:\users\ben\appdata\local\programs\python\python38\lib\site-packages\numba\core\object_mode_passes.py:177: NumbaWarning: Function &quot;get_result&quot; was compiled in object mode without forceobj=True, but has lifted loops.
  
  File &quot;..\_3_Labeling\CRV_Weighted_Score_labeling.py&quot;, line 422:
      def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result):
          &lt;source elided&gt;
          
          for i in prange(len_result):
          ^
  
    warnings.warn(errors.NumbaWarning(warn_msg,
  c:\users\ben\appdata\local\programs\python\python38\lib\site-packages\numba\core\object_mode_passes.py:187: NumbaDeprecationWarning: 
  Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.
  
  For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit
  
  File &quot;..\_3_Labeling\CRV_Weighted_Score_labeling.py&quot;, line 422:
      def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result):
          &lt;source elided&gt;
          
          for i in prange(len_result):
          ^
  
    warnings.warn(errors.NumbaDeprecationWarning(msg,
  D:/Arc/Arc_Project\Architecture\_3_Labeling\CRV_Weighted_Score_labeling.py:418: NumbaWarning: 
  Compilation is falling back to object mode WITHOUT looplifting enabled because Function &quot;get_result&quot; failed type inference due to: non-precise type pyobject
  During: typing of argument at D:/Arc/Arc_Project\Architecture\_3_Labeling\CRV_Weighted_Score_labeling.py (422)
  
  File &quot;..\_3_Labeling\CRV_Weighted_Score_labeling.py&quot;, line 422:
      def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result):
          &lt;source elided&gt;
          
          for i in prange(len_result):
          ^
  
    @nb.jit
  c:\users\ben\appdata\local\programs\python\python38\lib\site-packages\numba\core\object_mode_passes.py:177: NumbaWarning: Function &quot;get_result&quot; was compiled in object mode without forceobj=True.
  
  File &quot;..\_3_Labeling\CRV_Weighted_Score_labeling.py&quot;, line 422:
      def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result):
          &lt;source elided&gt;
          
          for i in prange(len_result):
          ^
  
    warnings.warn(errors.NumbaWarning(warn_msg,
  c:\users\ben\appdata\local\programs\python\python38\lib\site-packages\numba\core\object_mode_passes.py:187: NumbaDeprecationWarning: 
  Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.
  
  For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit
  
  File &quot;..\_3_Labeling\CRV_Weighted_Score_labeling.py&quot;, line 422:
      def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result):
          &lt;source elided&gt;
          
          for i in prange(len_result):
          ^
  
    warnings.warn(errors.NumbaDeprecationWarning(msg,
  </code></pre>
  <p>It creates a 5th array of random values <code>result</code> und sets either <code>1</code>s or <code>0</code>s depending on the condition: (yes theres 2 conditions for each, but this is because they have to be checked in a different order.</p>
  <p><code>RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices</code> are numpy arrays of objects (because its numpy arrays of numpy arrays of different sizes. (at the same index the sub arrays of those 4 np.arrays are the same lenght)</p>
  <p>Here is the function:(at the bottom there is a reproducable sample)</p>
  <pre><code>from numba import prange
  @nb.njit 
  def compare_size_filter(a,b): 
      return a &gt; b 
  @nb.njit(parallel=True)
  def loop_func(sub_RatiosUp, sub_RatiosDown, sub_UpPointsSlices, sub_DownPointsSlices, sub_result, len_shape):
       for j in prange(len_shape): 
          if compare_size_filter(sub_RatiosUp[j],sub_RatiosDown[j]):
              sub_result[j] = 1
          elif compare_size_filter(sub_RatiosDown[j],sub_RatiosUp[j]):
              sub_result[j] = 0
          elif compare_size_filter(sub_DownPointsSlices[j], sub_UpPointsSlices[j]): 
              sub_result[j] = 0
          else:                       
              sub_result[j] = 1  
  @nb.jit
  def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result): 
      for i in prange(len_result):
         loop_func(RatiosUp[i], RatiosDown[i], UpPointsSlices[i], DownPointsSlices[i], result[i], shapes[i]) 
      return result 
  
  </code></pre>
  <p>reproducable sample: (with a correct result list-comprehension to make sure, the result is still correct after changing anything)</p>
  <pre><code>import numpy as np, numba as nb, time
  
  # generate sample data
  LEN = 1000; Amount_Of_Elements = 4000
  temp = np.random.randint(Amount_Of_Elements*0.7,high=Amount_Of_Elements, size=LEN) 
  RatiosUp         = np.array([np.random.uniform(size=rand) for rand in temp], dtype=object)
  RatiosDown       = np.array([np.random.uniform(size=rand) for rand in temp], dtype=object)
  UpPointsSlices   = np.array([np.random.uniform(size=rand) for rand in temp], dtype=object)
  DownPointsSlices = np.array([np.random.uniform(size=rand) for rand in temp], dtype=object)  
   
  # this is the original result without numba (== same result as above when used without decorators)
  correct_result      = [ 
  [1 if (ratUp &gt;ratDown)  else 0 if (ratDown&gt;ratUp) else  0 if (pointsDown&gt;pointsUp) else 1    
                for ratUp,ratDown,pointsUp,pointsDown  
                            in zip(ratiosUpSlice,ratiosDownSlice,upPointsSlice,downPointsSlice)] 
                                          for ratiosUpSlice,ratiosDownSlice,upPointsSlice,downPointsSlice 
                                                     in zip(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices)]
  
  from numba import prange
  @nb.njit 
  def compare_size_filter(a,b): 
      return a &gt; b 
  @nb.njit(parallel=True)
  def loop_func(sub_RatiosUp, sub_RatiosDown, sub_UpPointsSlices, sub_DownPointsSlices, sub_result, len_shape):
       for j in prange(len_shape): 
          if compare_size_filter(sub_RatiosUp[j],sub_RatiosDown[j]):
              sub_result[j] = 1
          elif compare_size_filter(sub_RatiosDown[j],sub_RatiosUp[j]):
              sub_result[j] = 0
          elif compare_size_filter(sub_DownPointsSlices[j], sub_UpPointsSlices[j]): 
              sub_result[j] = 0
          else:                       
              sub_result[j] = 1  
  @nb.jit
  def get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes, result, len_result): 
      for i in prange(len_result):
         loop_func(RatiosUp[i], RatiosDown[i], UpPointsSlices[i], DownPointsSlices[i], result[i], shapes[i]) 
      return result 
  
  
  shapes   = np.asarray([arr.size for arr in RatiosUp],dtype=np.object)
  result   = np.asarray([np.empty(s,np.int8) for s in shapes],dtype=np.object) 
      
  result1 = get_result(RatiosUp, RatiosDown, UpPointsSlices, DownPointsSlices, shapes,result, nb.int64(len(result)))
  
  test = all(np.allclose(a,b, equal_nan=True) for a,b in zip(correct_result,result1.tolist()))
  print(test)```
  
  EDIT: (to avoid misunderstandings)
  
  its not about supression, but what i have to do different so that it wont be deprecated in the future. 
  </code></pre>