Skip to content

Commit 9379c76

Browse files
committed
coerce result masks
1 parent 7adee8b commit 9379c76

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/core/arrays/mask/_base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def __iand__(self, other):
5454
return type(self).from_scalars(
5555
np.array(self, copy=False) & (np.array(other, copy=False)))
5656

57-
def view(self, dtype):
58-
return np.array(self._data, copy=False).view(dtype)
57+
def view(self, dtype=None):
58+
return np.array(self._data, copy=False).view(dtype=dtype)
5959

6060
def sum(self, axis=None):
6161
return np.array(self, copy=False).sum()

pandas/core/indexing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2495,7 +2495,7 @@ def check_bool_indexer(ax, key):
24952495
result = result.to_dense()
24962496
result = np.asarray(result, dtype=bool)
24972497
elif isinstance(result, ABCMaskArray):
2498-
pass
2498+
result = np.array(result, copy=False)
24992499
else:
25002500
# is_bool_indexer has already checked for nulls in the case of an
25012501
# object array key, so no check needed here

0 commit comments

Comments
 (0)