Skip to content

Commit 5471dc7

Browse files
committed
Make the to_device signature test work
It uses device="cpu" so that NumPy passes, but this will not work with other libraries. This is still a TODO. The simplest thing other libraries can do for now is to manually replace device="cpu" with some valid device for that library in test_signatures.py code.
1 parent 7aa61f6 commit 5471dc7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

array_api_tests/test_signatures.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ def example_argument(arg, func_name, dtype):
7171
copy=True,
7272
correction=1.0,
7373
descending=True,
74-
# TODO: Update this to be non-default
75-
device=None,
74+
# TODO: This will only work on the NumPy implementation. The exact
75+
# value of the device keyword will vary across implementations, so we
76+
# need some way to infer it or for libraries to specify a list of
77+
# valid devices.
78+
device='cpu',
7679
dtype=float64,
7780
endpoint=False,
7881
fill_value=1.0,
@@ -103,6 +106,8 @@ def example_argument(arg, func_name, dtype):
103106
start=0,
104107
step=2,
105108
stop=1,
109+
# TODO: Update this to be non-default. See the comment on "device" above.
110+
stream=None,
106111
to=float64,
107112
type=float64,
108113
upper=True,

0 commit comments

Comments
 (0)