运行numpy警告:
<ipython-input-3-67c3327898a3>:2: 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. x = np.array([[0,1,2,3,4],
搜索了很多解决办法,都没有效果,其实解决办法就在警告信息里,直接改成下面这样就可以了!一定要注意dtype=object的位置。