Skip to content

Commit afdc879

Browse files
committed
ut
1 parent 9b64d5f commit afdc879

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

onnx_array_api/array_api/_onnx_common.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@ def asarray(
4646
dtype: Optional[DType] = None,
4747
order: Optional[str] = None,
4848
like: Any = None,
49+
device: Optional[str] = None,
4950
copy: bool = False,
5051
) -> EagerTensor:
5152
"""
5253
Converts anything into an array.
5354
"""
54-
"""
55-
Converts anything into an array.
56-
"""
55+
assert device is None, f"asarray not implemented yet for device={device!r}"
5756
if order not in ("C", None):
5857
raise NotImplementedError(f"asarray is not implemented for order={order!r}.")
5958
if like is not None:

onnx_array_api/npx/npx_functions.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ def astype(
281281
to = DType(TensorProto.STRING)
282282
else:
283283
raise TypeError(f"dtype must of type DType, not {type(dtype)}-{dtype}.")
284-
return var(a, op="Cast", to=to.code)
284+
return var(a, op="Cast", to=to.code)
285+
return var(a, op="Cast", to=dtype.code)
285286

286287

287288
@npxapi_inline

0 commit comments

Comments
 (0)