# Path: rosen_der/rosen_der_python.py
# def rosen_der_python(x):
#     n = x.shape[0]
#     der = numpy.zeros_like(x)
# 
#     for i in range(1, n - 1):
#         der[i] = (+ 200 * (x[i] - x[i - 1] ** 2)
#                   - 400 * (x[i + 1]
#                            - x[i] ** 2) * x[i]
#                   - 2 * (1 - x[i]))
#     der[0] = -400 * x[0] * (x[1] - x[0] ** 2) - 2 * (1 - x[0])
#     der[-1] = 200 * (x[-1] - x[-2] ** 2)
#     return der


from rosen_der import rosen_der_python
from parakeet import jit
# Authors: Serge Guelton
# License: MIT


benchmarks = (
     ("rosen_der_loops_parakeet", jit(rosen_der_python.rosen_der_python)),
     ("rosen_der_numpy_parakeet", jit(rosen_der_python.rosen_der_numpy))

# Path: rosen_der/rosen_der_python.py
# def rosen_der_python(x):
#     n = x.shape[0]
#     der = numpy.zeros_like(x)
# 
#     for i in range(1, n - 1):
#         der[i] = (+ 200 * (x[i] - x[i - 1] ** 2)
#                   - 400 * (x[i + 1]
#                            - x[i] ** 2) * x[i]
#                   - 2 * (1 - x[i]))
#     der[0] = -400 * x[0] * (x[1] - x[0] ** 2) - 2 * (1 - x[0])
#     der[-1] = 200 * (x[-1] - x[-2] ** 2)
#     return der


# Path: rosen_der/rosen_der_parakeet.py
from rosen_der import rosen_der_python
from parakeet import jit

# Authors: Serge Guelton
# License: MIT


benchmarks = (
     ("rosen_der_loops_parakeet", jit(rosen_der_python.rosen_der_python)),
     ("rosen_der_numpy_parakeet", jit(rosen_der_python.rosen_der_numpy))

 )