diff --git a/python-package/xgboost/core.py b/python-package/xgboost/core.py index 227f0bdeea43..18090a3acc87 100644 --- a/python-package/xgboost/core.py +++ b/python-package/xgboost/core.py @@ -1907,7 +1907,7 @@ def inplace_predict( if len(data.shape) != 1 and self.num_features() != data.shape[1]: raise ValueError( f"Feature shape mismatch, expected: {self.num_features()}, " - f"got {data.shape[0]}" + f"got {data.shape[1]}" ) if isinstance(data, np.ndarray):