Skip to content

Commit 2fcf69e

Browse files
authored
Merge pull request #167 from thisandthatuser/docfix
Fixed tutorial bug.
2 parents 58902a3 + 8aad979 commit 2fcf69e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/tutorials/coding_udp_simple.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,10 @@ our fitness method into C code.
229229
>>> class jit_rosenbrock:
230230
... def __init__(self,dim):
231231
... self.dim = dim
232-
... @jit
233232
... def fitness(self,x):
233+
... return jit_rosenbrock._fitness(x)
234+
... @jit
235+
... def _fitness(x):
234236
... retval = np.zeros((1,))
235237
... for i in range(len(x) - 1):
236238
... retval[0] += 100.*(x[i + 1]-x[i]**2)**2+(1.-x[i])**2

0 commit comments

Comments
 (0)