您当前的位置: 首页 > 
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

成功解决AttributeError: 'list' object has no attribute 'shape'

一个处女座的程序猿 发布时间:2019-05-07 09:32:39 ,浏览量:0

成功解决AttributeError: 'list' object has no attribute 'shape'

 

 

目录

解决问题

解决思路

解决方法

 

 

 

 

 

 

 

解决问题

AttributeError: 'list' object has no attribute 'shape'

 

解决思路

属性错误:“list”对象没有属性“shape”

 

解决方法

经常使用numpy库的会知道,np.array可使用 shape。而对于列表list,却不能使用shape来查看列表的维度。如果非要想查看列表维度,可以采用:

T1、将列表转为array格式,然后使用shape即可! list_shape = np.array(list_01).shape print(list_shape)

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0461s