Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitafdc879

Browse files
committed
ut
1 parent9b64d5f commitafdc879

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+
assertdeviceisNone,f"asarray not implemented yet for device={device!r}"
5756
ifordernotin ("C",None):
5857
raiseNotImplementedError(f"asarray is not implemented for order={order!r}.")
5958
iflikeisnotNone:

‎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
raiseTypeError(f"dtype must of type DType, not{type(dtype)}-{dtype}.")
284-
returnvar(a,op="Cast",to=to.code)
284+
returnvar(a,op="Cast",to=to.code)
285+
returnvar(a,op="Cast",to=dtype.code)
285286

286287

287288
@npxapi_inline

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp