Skip to content

Commit b4fcb38

Browse files
committed
Make elwise assertion util kwargs kw-only
1 parent adfee28 commit b4fcb38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

array_api_tests/test_operators_and_elementwise_functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def mock_int_dtype(n: int, dtype: DataType) -> int:
107107
# floats are used internally for optimisation or legacy reasons.
108108

109109

110-
def isclose(a: float, b: float, rel_tol: float = 0.25, abs_tol: float = 1) -> bool:
110+
def isclose(a: float, b: float, *, rel_tol: float = 0.25, abs_tol: float = 1) -> bool:
111111
"""Wraps math.isclose with very generous defaults.
112112
113113
This is useful for many floating-point operations where the spec does not
@@ -137,6 +137,7 @@ def unary_assert_against_refimpl(
137137
in_: Array,
138138
res: Array,
139139
refimpl: Callable[[T], T],
140+
*,
140141
expr_template: Optional[str] = None,
141142
res_stype: Optional[ScalarType] = None,
142143
filter_: Callable[[Scalar], bool] = default_filter,
@@ -184,6 +185,7 @@ def binary_assert_against_refimpl(
184185
right: Array,
185186
res: Array,
186187
refimpl: Callable[[T, T], T],
188+
*,
187189
expr_template: Optional[str] = None,
188190
res_stype: Optional[ScalarType] = None,
189191
left_sym: str = "x1",
@@ -234,6 +236,7 @@ def right_scalar_assert_against_refimpl(
234236
right: Scalar,
235237
res: Array,
236238
refimpl: Callable[[T, T], T],
239+
*,
237240
expr_template: str = None,
238241
res_stype: Optional[ScalarType] = None,
239242
left_sym: str = "x1",
@@ -486,6 +489,7 @@ def binary_param_assert_against_refimpl(
486489
res: Array,
487490
op_sym: str,
488491
refimpl: Callable[[T, T], T],
492+
*,
489493
res_stype: Optional[ScalarType] = None,
490494
filter_: Callable[[Scalar], bool] = default_filter,
491495
strict_check: Optional[bool] = None,

0 commit comments

Comments
 (0)