Skip to content

Commit

Permalink
aggregations.pyx: use std:: for signbit() and sqrt().
Browse files Browse the repository at this point in the history
This reintroduces how this was done in pandas 1.3.5.
This should fix issue pandas-dev#51047.
  • Loading branch information
he32 committed Jan 28, 2023
1 parent 852518e commit 3984d47
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pandas/_libs/window/aggregations.pyx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,6 +16,10 @@ from numpy cimport (
ndarray,
)

cdef extern from "<cmath>" namespace "std":
int signbit(float64_t) nogil
float64_t sqrt(float64_t x) nogil

cnp.import_array()

from pandas._libs.algos import is_monotonic
Expand Down

0 comments on commit 3984d47

Please sign in to comment.