Skip to content

Commit 752b706

Browse files
committed
Add more info to an error message
1 parent a8f8fdc commit 752b706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_strict/_creation_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
def _check_valid_dtype(dtype):
2121
# Note: Only spelling dtypes as the dtype objects is supported.
2222
if dtype not in (None,) + _all_dtypes:
23-
raise ValueError("dtype must be one of the supported dtypes")
23+
raise ValueError(f"dtype must be one of the supported dtypes, got {dtype!r}")
2424

2525
def _supports_buffer_protocol(obj):
2626
try:

0 commit comments

Comments
 (0)