Skip to content

Commit 5993eca

Browse files
committed
Fix potentially undefined variable
1 parent 930932a commit 5993eca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

array_api_tests/test_operators_and_elementwise_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@ def right_scalar_assert_against_refimpl(
369369
370370
See unary_assert_against_refimpl for more information.
371371
"""
372+
if expr_template is None:
373+
expr_template = func_name + "({}, {})={}"
372374
if left.dtype in dh.complex_dtypes:
373375
component_filter = copy(filter_)
374376
filter_ = lambda s: component_filter(s.real) and component_filter(s.imag)

0 commit comments

Comments
 (0)