Fix the ValueError message for random.binomial (forgot to use string formatting).

This commit is contained in:
carlosgmartin 2025-03-10 16:38:03 -04:00
parent affe2e734e
commit 8b6ca56417

View File

@ -2646,7 +2646,7 @@ def binomial(
dtypes.check_user_dtype_supported(dtype)
if not dtypes.issubdtype(dtype, np.floating):
raise ValueError(
"dtype argument to `binomial` must be a float dtype, got {dtype}"
f"dtype argument to `binomial` must be a float dtype, got {dtype}"
)
dtype = dtypes.canonicalize_dtype(dtype)
if shape is not None: