opencv
孙俏俏
这个作者很懒,什么都没留下…
展开
-
TypeError: 'range' object doesn't support item deletion
del(dataIndex[randIndex])python3.x , 出现错误 'range' object doesn't support item deletion原因:python3.x range返回的是range对象,不返回数组对象解决方法:把dataIndex=range(m)改为dataIndex=list(range(m))...转载 2019-05-07 14:27:18 · 745 阅读 · 0 评论 -
TypeError: 'numpy.float64' object cannot be in
weights=weights+alpha*error*dataMatrix[randIndex] 改为for k in range(n): weights[k] += alpha*error*dataMatrix[randIndex][k]转载 2019-05-07 14:29:39 · 481 阅读 · 0 评论 -
AttributeError: 'numpy.ndarray' object has no attribute 'getA'
解决方法:直接删除.getA()转载 2019-05-07 14:32:34 · 5236 阅读 · 2 评论 -
AttributeError: 'list' object has no attribute 'shape'
将 n1=dataMat1.shape[0]换成 n1=len(dataMat1)原创 2019-05-07 20:16:14 · 3971 阅读 · 1 评论