VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tupl

@pytorch环境下跑程序提示
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)
————————————————

程序正常运行但是看不惯满篇红色

这个问题降低自己的numpy的版本就好了,可以输入

pip3 show numpy

查看自己的numpy,我的原本是1.21.1就出现了上述问题,而后直接使用命令覆盖安装低版本numpy即可

pip3 install numpy==1.16.5

在安装的时候打算安装1.15.1,但是我的scipy要求numpy>=1.16.5,可以结合终端提示进行安装

你可能感兴趣的:(python,pytorch,numpy,pip)