Skip to content

Commit 1402def

Browse files
committed
TST: improve a dlpack test
1 parent 6525636 commit 1402def

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch_np/tests/numpy_tests/core/test_dlpack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ def test_ndim0(self):
105105

106106
def test_from_torch(self):
107107
t = torch.arange(4)
108-
a = torch.from_dlpack(t)
109-
assert_array_equal(a, t.numpy())
108+
a = np.from_dlpack(t)
109+
assert_array_equal(a, np.asarray(t))
110110

111111
def test_to_torch(self):
112112
a = np.arange(4)

0 commit comments

Comments
 (0)