Skip to content

Commit 700be61

Browse files
authored
changed shape argument for ndarray from int to tuple in ./core/strings/object_array.py (#44352)
1 parent eac5129 commit 700be61

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pandas/core/strings/object_array.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import pandas._libs.missing as libmissing
1313
import pandas._libs.ops as libops
1414
from pandas._typing import (
15-
Dtype,
15+
NpDtype,
1616
Scalar,
1717
)
1818

@@ -37,7 +37,7 @@ def __len__(self):
3737
raise NotImplementedError
3838

3939
def _str_map(
40-
self, f, na_value=None, dtype: Dtype | None = None, convert: bool = True
40+
self, f, na_value=None, dtype: NpDtype | None = None, convert: bool = True
4141
):
4242
"""
4343
Map a callable over valid elements of the array.
@@ -62,9 +62,7 @@ def _str_map(
6262
na_value = self._str_na_value
6363

6464
if not len(self):
65-
# error: Argument 1 to "ndarray" has incompatible type "int";
66-
# expected "Sequence[int]"
67-
return np.ndarray(0, dtype=dtype) # type: ignore[arg-type]
65+
return np.ndarray(0, dtype=dtype)
6866

6967
arr = np.asarray(self, dtype=object)
7068
mask = isna(arr)

0 commit comments

Comments
 (0)