qq_41563729
2018-01-11 03:07python 错误:AxisError: axis -1 is out ……
5pthon代码出现如下问题,不知道是何原因?谢谢!!!
runfile('D:/Python project/3Olive-lda2vec-master/examples/twenty_newsgroups/data/preprocess.py', wdir='D:/Python project/3Olive-lda2vec-master/examples/twenty_newsgroups/data')
Traceback (most recent call last):
File "", line 1, in
runfile('D:/Python project/3Olive-lda2vec-master/examples/twenty_newsgroups/data/preprocess.py', wdir='D:/Python project/3Olive-lda2vec-master/examples/twenty_newsgroups/data')
File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace)
File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "D:/Python project/3Olive-lda2vec-master/examples/twenty_newsgroups/data/preprocess.py", line 35, in
corpus.finalize()
File "D:\Python project\3Olive-lda2vec-master\lda2vec\corpus.py", line 155, in finalize
self.keys_loose, self.keys_counts, n_keys = self._loose_keys_ordered()
File "D:\Python project\3Olive-lda2vec-master\lda2vec\corpus.py", line 104, in _loose_keys_ordered
specials = np.sort(self.specials.values())
File "C:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 822, in sort
a.sort(axis=axis, kind=kind, order=order)
AxisError: axis -1 is out of bounds for array of dimension 0
- 点赞
- 回答
- 收藏
- 复制链接分享
3条回答
为你推荐
- ValueError: too many values to unpack (expected 2)
- python
- list
- 1个回答
- 如何解决ValueError: Length mismatch: Expected axis has 20 elements, new values have 19 elements
- python
- 2个回答
- 有没有办法在PHP / WordPress中托管Axis2服务?
- web-services
- wordpress
- axis2
- php
- 1个回答
- 解决python __init__() missing 1 required positional argument: 'layers'
- python
- 深度学习
- 神经网络
- 机器学习
- 1个回答
- 小白求助:python报错怎么解决 ?
- python
- 4个回答