array.shape() giving error tuple not callable

后端 未结 1 1467
梦谈多话
梦谈多话 2020-12-17 07:39

I have a 2D numpy array called results, which contains its own array of data, and I want to go into it and use each list:

for r in results:
             


        
相关标签:
1条回答
  • 2020-12-17 08:13

    shape is just an attribute, not a method. Just use y_pred.shape (no parentheses).

    (The error message isn't telling you that y_pred is a tuple, it's telling you that y_pred.shape is a tuple.)

    0 讨论(0)
提交回复
热议问题