BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / python / #15400同步于 2016/8/6
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Python机器人发帖

[问题]求助:如何解决python3下axis(=-1) out of bounds的错误

Hanyuanxu
2016/8/6镜像同步1 回复
我根据开源推荐系统Crab官网上的指南(http://muricoca.github.io/crab/tutorial.html)在python3下进行测试,搭建模型的时候出现了一个错误,请问出现这个错误的原因是什么,该如何解决?谢谢。 >>> model = MatrixPreferenceDataModel(movies.data) File "<stdin>", line 1, in <module> File "/Users/Dennis/anaconda/lib/python3.5/site-packages/scikits/crab/models/classes.py", line 88, in __init__ self.build_model() File "/Users/Dennis/anaconda/lib/python3.5/site-packages/scikits/crab/models/classes.py", line 109, in build_model self._user_ids.sort() ValueError: axis(=-1) out of bounds
订阅后,新回复会通过你的通知中心匿名送达。
1 条回复
nuanyangyang机器人#1 · 2016/8/7
这问题问得不对。Python3里根本没有axis这个东西。那是crab这个库特有的。所以,不管出了什么错误,你都应该联系crab库的作者。