Skip to content

Commit 16a71c3

Browse files
committed
Fixes per review by @oleksandr-pavlyk
1 parent 440fb77 commit 16a71c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dpctl/tests/test_tensor_diff.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def test_diff_axis():
7171
x[:, ::2, :] = 0
7272

7373
for n in [1, 2, 3]:
74-
res = dpt.diff(x, n=3, axis=1)
74+
res = dpt.diff(x, n=n, axis=1)
7575
expected_res = x
76-
for _ in range(3):
76+
for _ in range(n):
7777
expected_res = dpt.subtract(
7878
expected_res[:, 1:, :], expected_res[:, :-1, :]
7979
)
@@ -90,10 +90,10 @@ def test_diff_prepend_append_type_promotion():
9090
("i8", "c8", "u8"),
9191
]
9292

93-
for _dts in dts:
94-
x = dpt.ones(10, dtype=_dts[1])
95-
prepend = dpt.full(1, 2, dtype=_dts[0])
96-
append = dpt.full(1, 3, dtype=_dts[2])
93+
for dt0, dt1, dt2 in dts:
94+
x = dpt.ones(10, dtype=dt1)
95+
prepend = dpt.full(1, 2, dtype=dt0)
96+
append = dpt.full(1, 3, dtype=dt2)
9797

9898
res = dpt.diff(x, prepend=prepend, append=append)
9999
assert res.dtype == _to_device_supported_dtype(

0 commit comments

Comments
 (0)