tuples - 元组超出索引
问题描述
IndexError:元组索引超出范围
我收到了这个错误,我不知道为什么,因为我的代码看起来像
interpolated_mean = np.array([np.ones(X.shape[1])*self.means[digit] for digit in range(10)])
在哪里self.means
返回
[0.2950995723007362, 0.35157590125195076, 0.37957208825304445, 0.3191758946180043, 0.35155769941304243, 0.3984539137236574, 0.3008216529579752, 0.3630624989356188, 0.4623879642875728, 0.33528044078766084]
解决方案
推荐阅读
- runtime - 适用于 Ubuntu 14.04 的 OpenCL 运行时库
- numpy - AttributeError:“numpy.ndarray”对象没有属性“strip”
- javascript - Countdown Javascript Timer 不适用于平板电脑和手机,但适用于台式机
- wpf - wpflocalizeextension 引用另一个项目中的 .resx 文件
- algorithm - 如何从多个捆绑包中找到要购买的最便宜的产品组合以获取购物清单
- c - 为什么 USART2 发送垃圾值?
- java - 是否可以在不使用插件的情况下配置 maven 来编译生成的源代码?
- powershell - 如何使用 PowerShell 自动创建 CheckBox?
- ruby-on-rails - 在 Rails 上插入一对一关系
- audiokit - 基于 Audiokit 的应用程序无法处理一些流行的声音字体