Skip to content

Commit

Permalink
Fix compilation error due to type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
karltm authored Jul 19, 2023
1 parent 950ca50 commit 36a1743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fastpivot/pivot.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ cdef double median_cython_sort(vector[double] &vec):
cdef double value = 0.0
cdef double med
stdsort(vec.begin(), vec.end())
idx = vec.size() / 2
idx = <int>(vec.size() / 2)
if vec.size() % 2 == 1:
med = vec[idx]
elif vec.size() == 0:
Expand All @@ -513,7 +513,7 @@ cdef double median_cython_sort(vector[double] &vec):
# very slow on duplicates
cdef double median_cython(vector[double] &vec):
cdef int k = 0
cdef int mid = vec.size() / 2
cdef int mid = <int>(vec.size() / 2)
cdef double med
cdef int i = 0
cdef int j = vec.size() - 1
Expand Down

0 comments on commit 36a1743

Please sign in to comment.