Skip to content

Commit b430635

Browse files
committed
Removed npy_isnan import
1 parent 3ee99c0 commit b430635

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

pandas/_libs/groupby.pyx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ cdef int64_t iNaT = get_nat()
2525
cdef double NaN = <double> np.NaN
2626
cdef double nan = NaN
2727

28-
cdef extern from "numpy/npy_math.h" nogil:
29-
bint npy_isnan(double x)
30-
3128

3229
# TODO: aggregate multiple columns in single pass
3330
# ----------------------------------------------------------------------

pandas/_libs/groupby_helper.pxi.in

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -581,19 +581,9 @@ def group_rank_{{name}}(ndarray[float64_t, ndim=2] out,
581581
# reset the dups and sum_ranks, knowing that a new value is coming
582582
# up. the conditional also needs to handle nan equality and the
583583
# end of iteration
584-
{{if name=='int64'}}
585584
if (i == N - 1 or (
586585
(masked_vals[_as[i]] != masked_vals[_as[i+1]]) and not
587-
(masked_vals[_as[i]] == nan_fill_val and
588-
masked_vals[_as[i+1]] == nan_fill_val
589-
))):
590-
{{else}}
591-
if (i == N - 1 or (
592-
(masked_vals[_as[i]] != masked_vals[_as[i+1]]) and not
593-
(npy_isnan(masked_vals[_as[i]]) and
594-
npy_isnan(masked_vals[_as[i+1]])
595-
))):
596-
{{endif}}
586+
(mask[_as[i]] and mask[_as[i+1]]))):
597587
dups = sum_ranks = 0
598588
val_start = i
599589
grp_vals_seen += 1

0 commit comments

Comments
 (0)