# 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 pythran import compile_pythrancode
from inspect import getsource
import imp
# Authors: Serge Guelton
# License: MIT


# grab imports
imports = 'import numpy'
exports = '''
#pythran export rosen_der_numpy(float [])
'''
modname = 'rosen_der_pythran'

# grab the source from the original functions
sources = map(getsource,

# 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_pythran.py
from rosen_der import rosen_der_python
from pythran import compile_pythrancode
from inspect import getsource
import imp

# Authors: Serge Guelton
# License: MIT


# grab imports
imports = 'import numpy'
exports = '''
#pythran export rosen_der_numpy(float [])
'''
modname = 'rosen_der_pythran'

# grab the source from the original functions
sources = map(getsource,

              (rosen_der_python.rosen_der_numpy,)