We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbe38b8 commit 826f8f2Copy full SHA for 826f8f2
1 file changed
array_api_strict/_creation_functions.py
@@ -111,7 +111,9 @@ def asarray(
111
if dtype is None and device is not None:
112
res_dtype = DType(res.dtype)
113
if not device_supports_dtype(device, res_dtype):
114
- # find out the default dtype for the device
+ # 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.
117
from ._data_type_functions import isdtype
118
if isdtype(res_dtype, "bool"):
119
targ_dtype = DType("bool")
0 commit comments