From 392cdc88501ec683fb861d6f6a9d3da815c23b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Mon, 1 Jul 2024 09:13:30 +0200 Subject: [PATCH] TST: fix testing on Windows against numpy2 --- ewah_bool_utils/_testing.pyx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ewah_bool_utils/_testing.pyx b/ewah_bool_utils/_testing.pyx index 05d7ea1..cf49f8f 100644 --- a/ewah_bool_utils/_testing.pyx +++ b/ewah_bool_utils/_testing.pyx @@ -15,6 +15,10 @@ ctypedef fused dtype_t: np.float32_t np.float64_t +ctypedef fused int_t: + np.int32_t + np.int64_t + cdef class Index: cdef void* ewah_array @@ -73,7 +77,7 @@ cdef class Index: ids.size, ewah_array[0].sizeInBytes())) -cpdef np.uint64_t[:] ewah_set_and_unset(long[:] arr): +cpdef np.uint64_t[:] ewah_set_and_unset(int_t[:] arr): cdef ewah_bool_array *ewah_arr cdef vector[size_t] vec @@ -88,7 +92,7 @@ cpdef np.uint64_t[:] ewah_set_and_unset(long[:] arr): return np_arr -cpdef int find_ewah_collisions(long[:] arr1, long[:] arr2): +cpdef int find_ewah_collisions(int_t[:] arr1, int_t[:] arr2): cdef ewah_bool_array *ewah_arr1 cdef ewah_bool_array *ewah_arr2 cdef ewah_bool_array *ewah_arr_keys @@ -112,7 +116,7 @@ cpdef int find_ewah_collisions(long[:] arr1, long[:] arr2): return ncoll cpdef dtype_t[:] make_and_select_from_ewah_index(dtype_t[:] arr, - long[:] np_idx): + int_t[:] np_idx): cdef Index idx = Index() idx.set_from(np_idx)