Skip to content

Commit

Permalink
Merge pull request #1124 from AlanPearl/master
Browse files Browse the repository at this point in the history
Count cic indexes with int64 to prevent overflow
  • Loading branch information
aphearin authored Feb 20, 2025
2 parents 5e680d6 + 805b050 commit 5512a78
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def counts_in_cylinders_engine(

cdef bint c_return_indexes = return_indexes
cdef cnp.int64_t[:] counts = np.zeros(len(x1_sorted), dtype=np.int64)
cdef int current_indexes_cnt = 0
cdef int current_indexes_len = len(x1_sorted) if c_return_indexes else 0
cdef cnp.int64_t current_indexes_cnt = 0
cdef cnp.int64_t current_indexes_len = len(x1_sorted) if c_return_indexes else 0
cdef cnp.uint32_t[:,:] indexes = np.ascontiguousarray(
np.zeros((current_indexes_len, 2), dtype=np.uint32))

Expand Down

0 comments on commit 5512a78

Please sign in to comment.