当前位置:   article > 正文

python报错 VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences

visibledeprecationwarning: creating an ndarray from ragged nested sequences

python报错 VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences

报错原因:numpy中元素shape不一致
解决方案:对元素进行统一shape,可以使用指定数值填充法

/opt/conda/envs/common-1/lib/python3.7/site-packages/ipykernel_launcher.py:44: 
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
  • 1
  • 2
  • 3
  • 4
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/611119
推荐阅读
相关标签
  

闽ICP备14008679号