Skip to content

Commit

Permalink
TST: fix testing on Windows against numpy2
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Jul 1, 2024
1 parent 93ceb32 commit 392cdc8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ewah_bool_utils/_testing.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 392cdc8

Please sign in to comment.