Given that these are ndarrays, I would prefer using their shape argument, rather than calling np.shape: 'y_true.shape'.