完美解决IndexError: index 0 is out of bounds for axis 1 with size 0

旧城等待, 2022-11-21 11:22 1708阅读 0赞

文章目录

      • 问题描述
      • 原因分析
      • 解决方案

问题描述

IndexError: index 0 is out of bounds for axis 1 with size 0


原因分析

  查看列表,输出列表内容,查看列表的形状,发现列表的确是空值,所以需要修改列表中的内容。

  1. print(List.shape)

解决方案

  1. y = train_np[:, 0]
  2. print(train_np)

发表评论

表情:
评论列表 (有 0 条评论,1708人围观)

还没有评论,来说两句吧...

相关阅读