Skip to content

Commit e743c1e

Browse files
committed
revert sqrt changes
1 parent e6e7bcb commit e743c1e

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

pandas/_libs/algos.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ from numpy cimport (ndarray,
2727
cdef double NaN = <double> np.NaN
2828
cdef double nan = NaN
2929

30-
from libc.math cimport fabs
30+
from libc.math cimport fabs, sqrt
3131

3232
# this is our util.pxd
33-
from util cimport numeric, get_nat, sqrt
33+
from util cimport numeric, get_nat
3434

3535
import missing
3636

pandas/_libs/lib.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ from missing cimport checknull
6565

6666
cimport util
6767
cdef int64_t NPY_NAT = util.get_nat()
68-
from util cimport is_array, _checknull, sqrt
68+
from util cimport is_array, _checknull
6969

70-
from libc.math cimport fabs
70+
from libc.math cimport fabs, sqrt
7171

7272

7373
def values_from_object(object o):

pandas/_libs/src/util.pxd

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ cimport numpy as cnp
33
cimport cpython
44

55

6-
cdef extern from "headers/math.h":
7-
# use this version instead of `from libc.math cimport sqrt`; see GH#18420
8-
double sqrt(double x) nogil
9-
10-
116
cdef extern from "numpy_helper.h":
127
void set_array_not_contiguous(ndarray ao)
138

pandas/_libs/window.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ cdef double NaN = <double> np.NaN
3232
cdef inline int int_max(int a, int b): return a if a >= b else b
3333
cdef inline int int_min(int a, int b): return a if a <= b else b
3434

35-
from util cimport numeric, sqrt
35+
from util cimport numeric
3636

3737
cdef extern from "../src/headers/math.h":
3838
int signbit(double) nogil
39+
double sqrt(double x) nogil
3940

4041

4142
# Cython implementations of rolling sum, mean, variance, skewness,

0 commit comments

Comments
 (0)