Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (8 sloc) 245 Bytes
# setup: import numpy as np; r = np.arange(1000000, dtype=float)
# run: rosen(r)
import numpy as np
# pythran export rosen(float[])
def rosen(x):
t0 = 100 * (x[1:] - x[:-1] ** 2) ** 2
t1 = (1 - x[:-1]) ** 2
return np.sum(t0 + t1)
You can’t perform that action at this time.