Skip to content

Commit 9556aa4

Browse files
committed
Replace np.array with fillna
1 parent 2437ce2 commit 9556aa4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/core/generic.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9713,12 +9713,11 @@ def _where(
97139713
else:
97149714
if not hasattr(cond, "shape"):
97159715
cond = np.asanyarray(cond)
9716-
else:
9717-
cond = np.array(cond)
97189716
cond[isna(cond)] = True
97199717
if cond.shape != self.shape:
97209718
raise ValueError("Array conditional must be same shape as self")
97219719
cond = self._constructor(cond, **self._construct_axes_dict(), copy=False)
9720+
cond = cond.fillna(True)
97229721

97239722
# make sure we are boolean
97249723
fill_value = bool(inplace)

0 commit comments

Comments
 (0)