We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a46e6b commit 6d154f2Copy full SHA for 6d154f2
array_api_tests/test_linalg.py
@@ -745,10 +745,9 @@ def test_trace(x, kw):
745
# assert res.dtype == x.dtype, "trace() returned the wrong dtype"
746
747
n, m = x.shape[-2:]
748
- offset = kw.get('offset', 0)
749
assert res.shape == x.shape[:-2], "trace() returned the wrong shape"
750
751
- def true_trace(x_stack):
+ def true_trace(x_stack, offset=0):
752
# Note: the spec does not specify that offset must be within the
753
# bounds of the matrix. A large offset should just produce a size 0
754
# diagonal in the last dimension (trace 0). See test_diagonal().
0 commit comments