zoukankan      html  css  js  c++  java
  • numpy错误解决方案

    VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify ‘dtype=object’ when creating the ndarray
    bboxes = np.array(bboxes)
    

    在调用opencv一句简单代码时

    while cv.waitKey(1) < 0:
    

    出现以下错误

    E:Anaconda3envslabelimglibsite-packages
    umpylibfunction_base.py:793: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
      return array(a, order=order, subok=subok, copy=True)
    

    其实这不是错误,只是新版numpy的一个警告,可以忽略。当然总是显示影响美观,可以直接关闭该警告

    np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning)
    
  • 相关阅读:
    php基础
    MYSQL 常用函数
    MYSQL 练习题
    MYSQL 查询
    MYSQL:增删改
    隐藏导航
    分层导航
    图片轮播!
    你帅不帅?
    PHP 流程
  • 原文地址:https://www.cnblogs.com/MorganMa/p/14362063.html
Copyright © 2011-2022 走看看