Skip to content

Commit 5b26f9d

Browse files
committed
Move format kwargs to the end of elwise assert utils
1 parent b4fcb38 commit 5b26f9d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

array_api_tests/test_operators_and_elementwise_functions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ def unary_assert_against_refimpl(
138138
res: Array,
139139
refimpl: Callable[[T], T],
140140
*,
141-
expr_template: Optional[str] = None,
142141
res_stype: Optional[ScalarType] = None,
143142
filter_: Callable[[Scalar], bool] = default_filter,
144143
strict_check: Optional[bool] = None,
144+
expr_template: Optional[str] = None,
145145
):
146146
if in_.shape != res.shape:
147147
raise ValueError(f"{res.shape=}, but should be {in_.shape=}")
@@ -186,13 +186,13 @@ def binary_assert_against_refimpl(
186186
res: Array,
187187
refimpl: Callable[[T, T], T],
188188
*,
189-
expr_template: Optional[str] = None,
190189
res_stype: Optional[ScalarType] = None,
190+
filter_: Callable[[Scalar], bool] = default_filter,
191+
strict_check: Optional[bool] = None,
191192
left_sym: str = "x1",
192193
right_sym: str = "x2",
193194
res_name: str = "out",
194-
filter_: Callable[[Scalar], bool] = default_filter,
195-
strict_check: Optional[bool] = None,
195+
expr_template: Optional[str] = None,
196196
):
197197
if expr_template is None:
198198
expr_template = func_name + "({}, {})={}"
@@ -237,12 +237,12 @@ def right_scalar_assert_against_refimpl(
237237
res: Array,
238238
refimpl: Callable[[T, T], T],
239239
*,
240-
expr_template: str = None,
241240
res_stype: Optional[ScalarType] = None,
242-
left_sym: str = "x1",
243-
res_name: str = "out",
244241
filter_: Callable[[Scalar], bool] = default_filter,
245242
strict_check: Optional[bool] = None,
243+
left_sym: str = "x1",
244+
res_name: str = "out",
245+
expr_template: str = None,
246246
):
247247
if filter_(right):
248248
return # short-circuit here as there will be nothing to test

0 commit comments

Comments
 (0)