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.
这是因为新的numpy版本,将 创建不同长度或形状的列表或元组或ndarray的列表或ndarray元组的功能 会被弃用,虽然能够运行,但是总提示Warning还是很不舒服,况且之后也不能这样用了。
简而言之就是,array的各列或者各行的维度不同……
比如第一行有5个,第二行是4个这样……
解决办法:
方法一:使用更早的numpy版本
方法二:加上’dtype=object’
bboxes = np.array(test_list,dtype=object)
参考链接:
https://blog.csdn.net/qq_41917697/article/details/115698304