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:\Anaconda3\envs\labelimg\lib\site-packages\numpy\lib\function_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)
