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

Lines changed: 2 additions & 3 deletions
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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy