Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed Oct 27, 2023
1 parent 5921bf1 commit 5c4d8d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 0 additions & 7 deletions pandas/_libs/dtypes.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ from numpy cimport (
int16_t,
int32_t,
int64_t,
npy_bool,
uint8_t,
uint16_t,
uint32_t,
Expand All @@ -35,9 +34,3 @@ ctypedef fused numeric_t:
ctypedef fused numeric_object_t:
numeric_t
object

# bool + all numeric types + object, doesn't include complex
ctypedef fused bool_numeric_object_t:
npy_bool
numeric_t
object
6 changes: 3 additions & 3 deletions pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ cdef extern from "pandas/parser/pd_parser.h":
PandasParser_IMPORT

from pandas._libs cimport util
from pandas._libs.dtypes cimport bool_numeric_object_t
from pandas._libs.dtypes cimport numeric_object_t
from pandas._libs.util cimport (
INT64_MAX,
INT64_MIN,
Expand Down Expand Up @@ -2883,7 +2883,7 @@ def _map_infer_mask(
ndarray[object] arr,
object f,
const uint8_t[:] mask,
bool_numeric_object_t[:] dummy,
numeric_object_t[:] dummy,
bint convert=True,
object na_value=no_default,
cnp.dtype dtype=np.dtype(object)
Expand Down Expand Up @@ -2911,7 +2911,7 @@ def _map_infer_mask(
"""
cdef:
Py_ssize_t i, n
ndarray[bool_numeric_object_t] result
ndarray[numeric_object_t] result
object val

n = len(arr)
Expand Down

0 comments on commit 5c4d8d9

Please sign in to comment.