Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
APMonitor committed Apr 12, 2024
1 parent 333c143 commit e128555
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gekko/gekko.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,14 +573,14 @@ def arx(self,p,y=[],u=[]):
#define arrays of states, outputs and inputs
if isinstance(y,(GKVariable,GKParameter)):
y = [y] # convert to list of size 1
if y==[]:
if not y:
y = [self.Var() for i in np.arange(ny)]
else:
if len(y)!=ny:
raise Exception('arx input y must be an array of length '+str(ny))
if isinstance(u,(GKVariable,GKParameter)):
u = [u] # convert to list of size 1
if u==[]:
if not u:
u = [self.Param() for i in np.arange(nu)]
else:
if len(u)!=nu:
Expand Down

0 comments on commit e128555

Please sign in to comment.