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

这是为啥啊

环境如下:

ValueError: output parameter for reduction operation logical_and has too many dimensions ?的更多相关文章

  1. ValueError: zero-size array to reduction operation maximum which has no identity

    数据打印到第530行之后出现以下异常,求解!

  2. return value, output parameter,

    Return Value https://docs.microsoft.com/en-us/sql/t-sql/language-elements/return-transact-sql?view=s ...

  3. firefox同步ajax请求报错的问题 A parameter or an operation is not supported by the underlying object

    今天在测试系统时,一个很正常的功能在firefox下报错,经过验证在ie和chrome浏览器中功能这个正常.   调试后发现: 请求比其他请求的特殊点在于同步请求.   经过firefox的控制台上测 ...

  4. remount failed: Operation not permitted ,怎么办呢?

    remount failed: Operation not permitted ,怎么办呢? 1. 确定是否正确连接手机了$ adb devices 2. 进入shell$ adb shell 3. ...

  5. ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (60000, 28, 28)

    报错 Traceback (most recent call last): File "D:/PyCharm 5.0.3/WorkSpace/3.Keras/3.构建各种神经网络/3.CNN ...

  6. ValueError: Error when checking input: expected input_1 to have 2 dimensions, but got array with shape (100, 100, 100, 3)

    报错 Traceback (most recent call last): File "D:/PyCharm 5.0.3/WorkSpace/3.Keras/1.Sequential与Mod ...

  7. TypeError: reduction operation 'argmax' not allowed for this dtype

    这个错误真的tmd伤脑筋.我用idxmax函数去求series类型的最大值的索引,结果明明是下面这种数据, 无论我如何pint他的shape,type,他怎么看都是一个满足idxmax函数要求的参数类 ...

  8. TypeError: reduction operation 'argmin' not allowed for this dtype

    解决方法:在idxmax()前加.astype(‘float64’) .argmin() .argmax() 计算最大.小值所在位置的索引(针对自动索引的)(适用于Series类型:) .idxmin ...

  9. Invalid MyEclipse License - Discontinuing this MyEclipse operation. 出现这个错误怎么改正?

    Invalid MyEclipse License - Discontinuing this MyEclipse operation这句话的意思是无效的许可证-停用此MyEclipse操作入门就是你的 ...

随机推荐

  1. php通过CURL模拟post提交请求

    <?php header("Content-type:text/html;charset=utf-8"); class Test{ public function reque ...

  2. day 68 django 之api操作 | jQueryset集合与对象

    我们的orm里面分为: jQueryset集合, 还有对象, 我们的jqueryset集合里面可以有多个对象,这句话的意思就是我们的对象是最小的单位,不可以再拆分了,我们的jQueryset集合就相当 ...

  3. Linux下C语言进程通讯编程

    代码: #include <stdio.h> #include <stdlib.h> #include <sys/shm.h> /*************基本的函 ...

  4. 2018-05-01T00:00:00.000+08:00转2018-05-01 00:00:00

    /** * 2018-05-01T00:00:00.000+08:00转2018-05-01 00:00:00 * @param oldDateStr * @return * @throws Pars ...

  5. 上传前端webuploader

    多文件上传时,是有几个文件调用几次方法. 可以设置为单线程.

  6. basename

    我使用过的Linux命令之basename - 去掉文件名的目录和后缀 本文链接:http://codingstandards.iteye.com/blog/840784   (转载请注明出处) 用途 ...

  7. Hessian的使用以及理解

    官网 http://hessian.caucho.com/ Hessian的使用以及理解Hessian版本:3.1.5将包括如下的内容: Hessian的基本使用Hessian的原理Hessian和S ...

  8. Oracle DB

    索引 一.安装   卸载 一.安装 1.Oracle首先询问用户是否接受更新信息,一般选择不接受:Oracle安装选项,需为其配置数据库,所以此处会询问是否创建安装数据库,选择是系统类型,一般选择服务 ...

  9. CSS选择器、样式、盒模型

    一.CSS基础选择器 # 1.*(通配选择器):html,body以及body下用于显示的标签 #html和body颜色会被改变,但是div标签不会发生改变,由于不同的选择器具有优先级 # 语法:* ...

  10. RFID的winform程序心得2

    RFID的winform程序心得1 webBrowser1.AllowWebBrowserDrop = false;//将 WebBrowser 控件的 AllowWebBrowserDrop 属性设 ...