ValueError: output parameter for reduction operation logical_and has too many dimensions ?
https://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.all.html#numpy.all
运行示例,却发生错误
import numpy as np o = np.array([False]) z = np.all([-1,4,5], out=o)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 2098, in all
return arr.all(axis=axis, out=out, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/numpy/core/_methods.py", line 41, in _all
return umr_all(a, axis, dtype, out, keepdims)
ValueError: output parameter for reduction operation logical_and has too many dimensions
这是为啥啊
环境如下: