Skip to content

Commit 89e5f84

Browse files
jbrockmendeljreback
authored andcommitted
REF: use dispatch_to_extension_op for bool ops (#27959)
1 parent 562f423 commit 89e5f84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/core/ops/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,11 @@ def wrapper(self, other):
829829
# Defer to DataFrame implementation; fail early
830830
return NotImplemented
831831

832+
elif should_extension_dispatch(self, other):
833+
# e.g. SparseArray
834+
res_values = dispatch_to_extension_op(op, self, other)
835+
return _construct_result(self, res_values, index=self.index, name=res_name)
836+
832837
elif isinstance(other, (ABCSeries, ABCIndexClass)):
833838
is_other_int_dtype = is_integer_dtype(other.dtype)
834839
other = other if is_other_int_dtype else fill_bool(other)

0 commit comments

Comments
 (0)