fix
This commit is contained in:
@@ -3193,9 +3193,12 @@ def interactive_cum_flex_chart2(theworkouts, promember=0,
|
||||
|
||||
x1 = datadf['x1']
|
||||
y1 = datadf['y1']
|
||||
popt, pcov = optimize.curve_fit(func, x1, y1)
|
||||
ytrend = func(x1, popt[0], popt[1])
|
||||
datadf['ytrend'] = ytrend
|
||||
try:
|
||||
popt, pcov = optimize.curve_fit(func, x1, y1)
|
||||
ytrend = func(x1, popt[0], popt[1])
|
||||
datadf['ytrend'] = ytrend
|
||||
except TypeError:
|
||||
datadf['ytrend'] = y1
|
||||
|
||||
data_dict = datadf.to_dict("records")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user