質問編集履歴

1

誤字

2021/12/30 11:42

投稿

Jason_318
Jason_318

スコア0

test CHANGED
File without changes
test CHANGED
@@ -228,7 +228,7 @@
228
228
 
229
229
  x=np.linspace(self.var_dict['lower'],self.var_dict['upper'],100)
230
230
 
231
- plt.plot(x,self.f(x),'r',x,sum(self.a[i]*(x**i) for i in range(self.n+1)),'k:')
231
+ plt.plot(x,self.f(x)[0],'r',x,sum(self.a[i]*(x**i) for i in range(self.n+1)),'k:')
232
232
 
233
233
  plt.show()
234
234
 
@@ -268,7 +268,7 @@
268
268
 
269
269
 
270
270
 
271
- print(f(x))
271
+ print(f(x)[0])
272
272
 
273
273
  sin=BestApprox(f)
274
274