diff --git a/packages/tack-core/tests/test_array_views.py b/packages/tack-core/tests/test_array_views.py index 2b6083cb..c89aa4bc 100644 --- a/packages/tack-core/tests/test_array_views.py +++ b/packages/tack-core/tests/test_array_views.py @@ -11,6 +11,7 @@ DLPack; and to writing only its own rows. """ +import ctypes import gc import numpy as np @@ -146,6 +147,8 @@ def _same_view(a, b): assert x.__array_interface__ == y.__array_interface__, k elif hasattr(x, "ptr"): # Warp's array over the view's memory assert (x.ptr, x.shape, x.dtype) == (y.ptr, y.shape, y.dtype), k + elif isinstance(x, ctypes.c_void_p): # Level Zero's pointer: ctypes compares by identity + assert type(y) is ctypes.c_void_p and x.value == y.value, k elif k != "_view": # Metal's NumPy view of its memory assert x == y or x is y, k