Skip to content

Commit 826f8f2

Browse files
ev-brbetatim
andauthored
Update array_api_strict/_creation_functions.py
Co-authored-by: Tim Head <betatim@gmail.com>
1 parent dbe38b8 commit 826f8f2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

array_api_strict/_creation_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ def asarray(
111111
if dtype is None and device is not None:
112112
res_dtype = DType(res.dtype)
113113
if not device_supports_dtype(device, res_dtype):
114-
# find out the default dtype for the device
114+
# The dtype selected by Numpy might not be the default dtype
115+
# on this device. If the dtype is not supported by the device we
116+
# try to find one that is, aka the default dtype of this device.
115117
from ._data_type_functions import isdtype
116118
if isdtype(res_dtype, "bool"):
117119
targ_dtype = DType("bool")

0 commit comments

Comments
 (0)