Skip to content

Commit 4d2f88a

Browse files
authored
Merge pull request scipy#21856 from tylerjereddy/treddy_issue_21855
2 parents b919b4a + 5980ce6 commit 4d2f88a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scipy/_lib/tests/test_array_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def test_check_scalar_no_0d(self, xp):
196196
def test_create_diagonal(self, n, offset, xp):
197197
rng = np.random.default_rng(2347823)
198198
one = xp.asarray(1.)
199-
x = xp.asarray(rng.random(n), dtype=one.dtype)
200-
A = xp_create_diagonal(x, offset=offset, xp=xp)
199+
x = rng.random(n)
200+
A = xp_create_diagonal(xp.asarray(x, dtype=one.dtype), offset=offset, xp=xp)
201201
B = xp.asarray(np.diag(x, offset), dtype=one.dtype)
202202
xp_assert_equal(A, B)

0 commit comments

Comments
 (0)