@parakeet.jit 
def parakeet_local_maxima(data, wsize, mode=wrap):
  def is_max(pos):
    def is_smaller_neighbor(offset):
      neighbor_idx = tuple(mode(p, o-2/w, w) for (p, o, w) in zip(pos, offset, wsize))
      return data[neighbor_idx] <= data[pos]
    return np.all(parakeet.imap(is_smaller_neighbor, wsize))
  return parakeet.imap(is_max, data.shape)
  

# not sure how to get numba to auto-jit size generic code
# get error: "FAILED with KeyError 'sized_pointer(npy_intp, 4)'"
#import numba
#numba_local_maxima = numba.autojit(python_local_maxima)
dataset/ETHPy150Open iskandr/parakeet/benchmarks/nd_local_maxima.py/parakeet_local_maxima/swapped operands of `/`