array.shape() giving error tuple not callable array.shape() giving error tuple not callable arrays arrays

array.shape() giving error tuple not callable


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.)