summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_creation_functions.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-02-26 17:46:25 -0700
committerAaron Meurer <asmeurer@gmail.com>2021-02-26 17:46:25 -0700
commitb7856e348d731551405bdf0dd41ff1b0416da129 (patch)
tree7e37a4653e6e926cbf0cf84c9c59686a1901426a /numpy/_array_api/_creation_functions.py
parent892b536a36b89f362a845fd50959d6474ec2c5f4 (diff)
downloadnumpy-b7856e348d731551405bdf0dd41ff1b0416da129.tar.gz
Make an error message easier to read
Diffstat (limited to 'numpy/_array_api/_creation_functions.py')
-rw-r--r--numpy/_array_api/_creation_functions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/_array_api/_creation_functions.py b/numpy/_array_api/_creation_functions.py
index ba5b4c87a..4be482199 100644
--- a/numpy/_array_api/_creation_functions.py
+++ b/numpy/_array_api/_creation_functions.py
@@ -23,7 +23,7 @@ def asarray(obj: Union[float, NestedSequence[bool|int|float], SupportsDLPack, Su
return obj
res = np.asarray(obj, dtype=dtype)
if res.dtype not in _dtypes._all_dtypes:
- raise TypeError(f"The array_api namespace does not support the dtype {res.dtype}")
+ raise TypeError(f"The array_api namespace does not support the dtype '{res.dtype}'")
return ndarray._new(res)
def arange(start: Union[int, float], /, *, stop: Optional[Union[int, float]] = None, step: Union[int, float] = 1, dtype: Optional[dtype] = None, device: Optional[device] = None) -> array: