From 3984d47e59038fc74ad243b06deab475d70a209e Mon Sep 17 00:00:00 2001 From: Havard Eidnes Date: Sat, 28 Jan 2023 19:24:03 +0000 Subject: [PATCH] aggregations.pyx: use std:: for signbit() and sqrt(). This reintroduces how this was done in pandas 1.3.5. This should fix issue #51047. --- pandas/_libs/window/aggregations.pyx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pandas/_libs/window/aggregations.pyx b/pandas/_libs/window/aggregations.pyx index 3055b8ff48cc9..6eb18dea732b8 100644 --- a/pandas/_libs/window/aggregations.pyx +++ b/pandas/_libs/window/aggregations.pyx @@ -1,10 +1,7 @@ # cython: boundscheck=False, wraparound=False, cdivision=True -from libc.math cimport ( - round, - signbit, - sqrt, -) +from libc.math cimport round + from libcpp.deque cimport deque from pandas._libs.algos cimport TiebreakEnumType @@ -19,6 +16,10 @@ from numpy cimport ( ndarray, ) +cdef extern from "" namespace "std": + int signbit(float64_t) nogil + float64_t sqrt(float64_t x) nogil + cnp.import_array() from pandas._libs.algos import is_monotonic