Skip to content

Commit dda5258

Browse files
committed
Ensure array for updatefcn input
1 parent e6ba790 commit dda5258

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/iosys.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ We begin by defining the dynamics of the system
7979
L = x[1]
8080
8181
# Compute the control action (only allow addition of food)
82-
u_0 = u if u > 0 else 0
82+
u_0 = u[0] if u[0] > 0 else 0
8383
8484
# Compute the discrete updates
8585
dH = (r + u_0) * H * (1 - H/k) - (a * H * L)/(c + H)
8686
dL = b * (a * H * L)/(c + H) - d * L
8787
88-
return [dH, dL]
88+
return np.array([dH, dL])
8989
9090
We now create an input/output system using these dynamics:
9191

0 commit comments

Comments
 (0)