zoukankan      html  css  js  c++  java
  • 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

    这是为啥啊

    环境如下:

  • 相关阅读:
    了解jQuery
    jQuery其他关系查找方法
    jQuery中的入口函数
    漫谈《挪威的森林》
    再说变
    再说鞋
    SDG
    Apache Geode简介
    2021/11/24策略模式
    2021/11/26
  • 原文地址:https://www.cnblogs.com/mengshu-lbq/p/8602292.html
Copyright © 2011-2022 走看看