Skip to content

Commit 264d17d

Browse files
committed
Fix
1 parent 01e90cb commit 264d17d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pandas/core/internals/managers.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -1917,21 +1917,21 @@ def _merge_blocks(
19171917

19181918

19191919
def _compare_or_regex_search(
1920-
a: ArrayLike,
1921-
b: Union[Scalar, Pattern],
1920+
a: Union[ArrayLike, Scalar],
1921+
b: Union[ArrayLike, Scalar, Pattern],
19221922
regex: bool = False,
19231923
mask: Optional[ArrayLike] = None,
19241924
) -> Union[ArrayLike, bool]:
19251925
"""
1926-
Compare two array_like inputs of the same shape or two scalar values
1926+
Compare two array-like or scalar inputs.
19271927
19281928
Calls operator.eq or re.search, depending on regex argument. If regex is
19291929
True, perform an element-wise regex matching.
19301930
19311931
Parameters
19321932
----------
1933-
a : array_like
1934-
b : scalar or regex pattern
1933+
a : array-like or scalar
1934+
b : array-like, scalar, or regex pattern
19351935
regex : bool, default False
19361936
mask : array_like or None (default)
19371937
@@ -1941,7 +1941,9 @@ def _compare_or_regex_search(
19411941
"""
19421942

19431943
def _check_comparison_types(
1944-
result: Union[ArrayLike, bool], a: ArrayLike, b: Union[Scalar, Pattern],
1944+
result: Union[ArrayLike, bool],
1945+
a: Union[ArrayLike, Scalar],
1946+
b: Union[ArrayLike, Scalar, Pattern],
19451947
):
19461948
"""
19471949
Raises an error if the two arrays (a,b) cannot be compared.

0 commit comments

Comments
 (0)