Skip to content

Commit fb7af6e

Browse files
committed
CLN: move groupby algos separate cython lib
- separate out groupby algorithms to separate lib - release GIL on median - release GIL on is_lexsorted / fix memory leak - release GIL on nancorr Author: Jeff Reback <[email protected]> Closes #15775 from jreback/groupby and squashes the following commits: 4e2bfec [Jeff Reback] release GIL on median release GIL on is_lexsorted / fix memory leak release GIL on nancorr ce28bb5 [Jeff Reback] CLN: separate out groupby algorithms to separate lib
1 parent 2a3b05a commit fb7af6e

File tree

9 files changed

+474
-422
lines changed

9 files changed

+474
-422
lines changed

pandas/_libs/algos.pxd

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from util cimport numeric
2+
from numpy cimport float64_t, double_t
3+
4+
cpdef numeric kth_smallest(numeric[:] a, Py_ssize_t k) nogil
5+
6+
cdef inline Py_ssize_t swap(numeric *a, numeric *b) nogil:
7+
cdef numeric t
8+
9+
# cython doesn't allow pointer dereference so use array syntax
10+
t = a[0]
11+
a[0] = b[0]
12+
b[0] = t
13+
return 0

0 commit comments

Comments
 (0)