Skip to content

Commit

Permalink
CLN: move groupby algos separate cython lib
Browse files Browse the repository at this point in the history
- 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 <jeff@reback.net>

Closes pandas-dev#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
  • Loading branch information
jreback committed Mar 22, 2017
1 parent 2a3b05a commit fb7af6e
Show file tree
Hide file tree
Showing 9 changed files with 474 additions and 422 deletions.
13 changes: 13 additions & 0 deletions pandas/_libs/algos.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from util cimport numeric
from numpy cimport float64_t, double_t

cpdef numeric kth_smallest(numeric[:] a, Py_ssize_t k) nogil

cdef inline Py_ssize_t swap(numeric *a, numeric *b) nogil:
cdef numeric t

# cython doesn't allow pointer dereference so use array syntax
t = a[0]
a[0] = b[0]
b[0] = t
return 0
Loading

0 comments on commit fb7af6e

Please sign in to comment.