We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58902a3 commit 8aad979Copy full SHA for 8aad979
doc/tutorials/coding_udp_simple.rst
@@ -229,8 +229,10 @@ our fitness method into C code.
229
>>> class jit_rosenbrock:
230
... def __init__(self,dim):
231
... self.dim = dim
232
- ... @jit
233
... def fitness(self,x):
+ ... return jit_rosenbrock._fitness(x)
234
+ ... @jit
235
+ ... def _fitness(x):
236
... retval = np.zeros((1,))
237
... for i in range(len(x) - 1):
238
... retval[0] += 100.*(x[i + 1]-x[i]**2)**2+(1.-x[i])**2
0 commit comments