Skip to content
Snippets Groups Projects
Commit 7e32f00c authored by Markus Holzer's avatar Markus Holzer
Browse files

Add more tests

parent d6df3ac1
Branches
Tags
No related merge requests found
Pipeline #53777 passed
...@@ -387,3 +387,18 @@ def test_array_handler(): ...@@ -387,3 +387,18 @@ def test_array_handler():
random_array = array_handler.randn(size) random_array = array_handler.randn(size)
cpu_array = np.empty((20, 40), dtype=np.float64)
gpu_array = array_handler.to_gpu(cpu_array)
assert cpu_array.base is None
assert gpu_array.base is None
assert gpu_array.strides == cpu_array.strides
cpu_array2 = np.empty((20, 40), dtype=np.float64)
cpu_array2 = cpu_array2.swapaxes(0, 1)
gpu_array2 = array_handler.to_gpu(cpu_array2)
assert cpu_array2.base is not None
assert gpu_array2.base is not None
assert gpu_array2.strides == cpu_array2.strides
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment