Skip to content

Commit 01e90cb

Browse files
committed
Type and docstring
1 parent 3d5c167 commit 01e90cb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/core/internals/managers.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,10 @@ def _merge_blocks(
19171917

19181918

19191919
def _compare_or_regex_search(
1920-
a: ArrayLike, b: Scalar, regex: bool = False, mask: Optional[ArrayLike] = None
1920+
a: ArrayLike,
1921+
b: Union[Scalar, Pattern],
1922+
regex: bool = False,
1923+
mask: Optional[ArrayLike] = None,
19211924
) -> Union[ArrayLike, bool]:
19221925
"""
19231926
Compare two array_like inputs of the same shape or two scalar values
@@ -1928,7 +1931,7 @@ def _compare_or_regex_search(
19281931
Parameters
19291932
----------
19301933
a : array_like
1931-
b : scalar
1934+
b : scalar or regex pattern
19321935
regex : bool, default False
19331936
mask : array_like or None (default)
19341937
@@ -1938,7 +1941,7 @@ def _compare_or_regex_search(
19381941
"""
19391942

19401943
def _check_comparison_types(
1941-
result: Union[ArrayLike, bool], a: ArrayLike, b: Scalar,
1944+
result: Union[ArrayLike, bool], a: ArrayLike, b: Union[Scalar, Pattern],
19421945
):
19431946
"""
19441947
Raises an error if the two arrays (a,b) cannot be compared.

0 commit comments

Comments
 (0)