Skip to content

Commit 8df36a2

Browse files
authored
PERF: Cython 3.0 regression with frame constructor (#55931)
1 parent 17431d2 commit 8df36a2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pandas/_libs/lib.pyi

+5-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ def is_string_array(values: np.ndarray, skipna: bool = ...): ...
6363
def is_float_array(values: np.ndarray, skipna: bool = ...): ...
6464
def is_integer_array(values: np.ndarray, skipna: bool = ...): ...
6565
def is_bool_array(values: np.ndarray, skipna: bool = ...): ...
66-
def fast_multiget(mapping: dict, keys: np.ndarray, default=...) -> np.ndarray: ...
66+
def fast_multiget(
67+
mapping: dict,
68+
keys: np.ndarray, # object[:]
69+
default=...,
70+
) -> np.ndarray: ...
6771
def fast_unique_multiple_list_gen(gen: Generator, sort: bool = ...) -> list: ...
6872
def fast_unique_multiple_list(lists: list, sort: bool | None = ...) -> list: ...
6973
def map_infer(

pandas/_libs/lib.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3088,7 +3088,7 @@ def to_object_array_tuples(rows: object) -> np.ndarray:
30883088

30893089
@cython.wraparound(False)
30903090
@cython.boundscheck(False)
3091-
def fast_multiget(dict mapping, ndarray keys, default=np.nan) -> np.ndarray:
3091+
def fast_multiget(dict mapping, object[:] keys, default=np.nan) -> np.ndarray:
30923092
cdef:
30933093
Py_ssize_t i, n = len(keys)
30943094
object val

0 commit comments

Comments
 (0)