From facb89d2da66118e0caabb3a70d5971a1a60b022 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Fri, 13 Dec 2019 14:54:17 -0800 Subject: [PATCH 1/2] Removed skiplist file --- pandas/_libs/skiplist.pxd | 24 ------------------------ pandas/_libs/window/aggregations.pyx | 24 +++++++++++++++++++++--- 2 files changed, 21 insertions(+), 27 deletions(-) delete mode 100644 pandas/_libs/skiplist.pxd diff --git a/pandas/_libs/skiplist.pxd b/pandas/_libs/skiplist.pxd deleted file mode 100644 index e827223bbe0a7..0000000000000 --- a/pandas/_libs/skiplist.pxd +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# See GH#27465 for reference on related-but-unused cython code - -cdef extern from "src/skiplist.h": - ctypedef struct node_t: - node_t **next - int *width - double value - int is_nil - int levels - int ref_count - - ctypedef struct skiplist_t: - node_t *head - node_t **tmp_chain - int *tmp_steps - int size - int maxlevels - - skiplist_t* skiplist_init(int) nogil - void skiplist_destroy(skiplist_t*) nogil - double skiplist_get(skiplist_t*, int, int*) nogil - int skiplist_insert(skiplist_t*, double) nogil - int skiplist_remove(skiplist_t*, double) nogil diff --git a/pandas/_libs/window/aggregations.pyx b/pandas/_libs/window/aggregations.pyx index 8b1588c35b4de..0348843abc129 100644 --- a/pandas/_libs/window/aggregations.pyx +++ b/pandas/_libs/window/aggregations.pyx @@ -22,9 +22,27 @@ from pandas._libs.algos import is_monotonic from pandas._libs.util cimport numeric -from pandas._libs.skiplist cimport ( - skiplist_t, skiplist_init, skiplist_destroy, skiplist_get, skiplist_insert, - skiplist_remove) +cdef extern from "../src/skiplist.h": + ctypedef struct node_t: + node_t **next + int *width + double value + int is_nil + int levels + int ref_count + + ctypedef struct skiplist_t: + node_t *head + node_t **tmp_chain + int *tmp_steps + int size + int maxlevels + + skiplist_t* skiplist_init(int) nogil + void skiplist_destroy(skiplist_t*) nogil + double skiplist_get(skiplist_t*, int, int*) nogil + int skiplist_insert(skiplist_t*, double) nogil + int skiplist_remove(skiplist_t*, double) nogil cdef: float32_t MINfloat32 = np.NINF From 969bdc377bdf0c986fb4309845ced6bc85fd397f Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Fri, 13 Dec 2019 14:57:02 -0800 Subject: [PATCH 2/2] Added depends to setup --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 01d41ea5241f2..e42a570200dc3 100755 --- a/setup.py +++ b/setup.py @@ -687,6 +687,7 @@ def srcpath(name=None, suffix=".pyx", subdir="src"): "pyxfile": "_libs/window/aggregations", "language": "c++", "suffix": ".cpp", + "depends": ["pandas/_libs/src/skiplist.h"], }, "_libs.window.indexers": {"pyxfile": "_libs/window/indexers"}, "_libs.writers": {"pyxfile": "_libs/writers"},