Skip to content

Commit 6d154f2

Browse files
committed
Fix test_trace
1 parent 7a46e6b commit 6d154f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

array_api_tests/test_linalg.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,9 @@ def test_trace(x, kw):
745745
# assert res.dtype == x.dtype, "trace() returned the wrong dtype"
746746

747747
n, m = x.shape[-2:]
748-
offset = kw.get('offset', 0)
749748
assert res.shape == x.shape[:-2], "trace() returned the wrong shape"
750749

751-
def true_trace(x_stack):
750+
def true_trace(x_stack, offset=0):
752751
# Note: the spec does not specify that offset must be within the
753752
# bounds of the matrix. A large offset should just produce a size 0
754753
# diagonal in the last dimension (trace 0). See test_diagonal().

0 commit comments

Comments
 (0)