Skip to content

Commit 975387c

Browse files
audersonmroeschke
andauthored
Update pandas/core/generic.py
Co-authored-by: Matthew Roeschke <[email protected]>
1 parent edc3bcf commit 975387c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/generic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9732,9 +9732,9 @@ def _where(
97329732
if not is_bool_dtype(cond):
97339733
raise TypeError(msg.format(dtype=cond.dtype))
97349734
else:
9735-
for _dt in [blk.dtype for blk in cond._mgr.blocks]:
9736-
if not is_bool_dtype(_dt):
9737-
raise TypeError(msg.format(dtype=_dt))
9735+
for block in cond._mgr.blocks:
9736+
if not is_bool_dtype(block.dtype):
9737+
raise TypeError(msg.format(dtype=block.dtype))
97389738
if cond._mgr.any_extension_types:
97399739
# GH51574: avoid object ndarray conversion later on
97409740
cond = cond._constructor(

0 commit comments

Comments
 (0)