Skip to content

Commit e557c05

Browse files
committed
Remove dtype
1 parent dfa96ac commit e557c05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9727,7 +9727,7 @@ def _where(
97279727
cond = cond.align(self, join="right")[0]
97289728
else:
97299729
if not hasattr(cond, "shape"):
9730-
cond = np.asanyarray(cond, dtype=object)
9730+
cond = np.asanyarray(cond)
97319731
if cond.shape != self.shape:
97329732
raise ValueError("Array conditional must be same shape as self")
97339733
cond = self._constructor(cond, **self._construct_axes_dict(), copy=False)
@@ -10112,7 +10112,7 @@ def mask(
1011210112

1011310113
# see gh-21891
1011410114
if not hasattr(cond, "__invert__"):
10115-
cond = np.array(cond, dtype=object)
10115+
cond = np.array(cond)
1011610116

1011710117
if isinstance(cond, np.ndarray):
1011810118
if all(x is NA or lib.is_bool(x) or x is np.nan for x in cond.flatten()):

0 commit comments

Comments
 (0)