I tried this code but it seems that something is wrong. Normaly print (z.value) must return a single number but in my case it returns an array. could someone help please
from gekko import GEKKO
import numpy as np
import matplotlib.pyplot as plt
xm = np.array([0,1,2,3,4,5])
ym = np.array([0.1,0.2,0.3,0.5,0.8,2.0])
m = GEKKO()
x = m.Param(value=xm)
a = m.FV()
a.STATUS=1
y = m.CV(value=ym)
y.FSTATUS=1
z = None
m.Equation(y==0.1*m.exp(a*x))
z = m.Intermediate(sum([y[i] for i in range(len(y))]))
m.options.IMODE = 2
m.solve(disp=False)
print(z.value)
print(y.value)