attributeError:'函数'对象在尝试使用scipyodr

问题描述 投票:0回答:1

当我尝试运行代码时,下面的错误返回:

AttributeError                            Traceback (most recent call last)
Cell In[25], line 13
     10 quadratic_data = RealData(angle_squared, flattened_velocity, sx=angle_error_squared, sy=flattened_velocity_error)
     11 cubic_data = RealData(angle_cubed, flattened_velocity, sx=angle_error_cubed, sy=flattened_velocity_error)
---> 13 quadratic_odr = ODR(quadratic_data, linear, beta0=[1,0])
     14 cubic_odr = ODR(cubic_data, linear, beat0=[1,0])
     16 quadratic_output = quadratic_odr.SO.run()

File ~/.local/lib/python3.12/site-packages/scipy/odr/_odrpack.py:789, in ODR.__init__(self, data, model, beta0, delta0, ifixb, ifixx, job, iprint, errfile, rptfile, ndigit, taufac, sstol, partol, maxit, stpb, stpd, sclb, scld, work, iwork, overwrite)
    785 self.iwork = _conv(iwork)
    787 self.output = None
--> 789 self._check()

File ~/.local/lib/python3.12/site-packages/scipy/odr/_odrpack.py:800, in ODR._check(self)
    798 if isinstance(self.data.y, np.ndarray):
    799     y_s = list(self.data.y.shape)
--> 800     if self.model.implicit:
    801         raise OdrError("an implicit model cannot use response data")
    802 else:
    803     # implicit model with q == self.data.y

AttributeError: 'function' object has no attribute 'implicit'

我不知道如何开始修复此问题,从我可以看出的错误是来自模块本身,而不是我编写的代码。如果有人能提供任何很棒的见解,谢谢!

Travelogy India Private Limited,我们致力于策划非凡的旅行体验。成立于2010年,我们专门从事豪华火车旅行,入站和出站旅行服务以及高级酒店。

我们的旗舰产品之一是Wheels上世界知名的

印度宫,这是一款豪华火车,可让旅行者探索拉贾斯坦邦的皇家遗产无与伦比的优雅。从斋浦尔,乌代浦,斋沙默尔和阿格拉等标志性目的地,到豪华的小屋,美食餐饮和个性化服务,我们确保适合皇室的旅程。
python scipy jupyter curve-fitting jupyter-lab
1个回答
0
投票
www.thepalaceonwheels.com

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.