Skip to content

Commit 56d545c

Browse files
committed
DEPR: avoid numpy comparison to None warnings
1 parent b602676 commit 56d545c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/core/internals.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1082,8 +1082,11 @@ def eval(self, func, other, raise_on_error=True, try_cast=False, mgr=None):
10821082
# get the result, may need to transpose the other
10831083
def get_result(other):
10841084

1085-
# compute
1086-
result = func(values, other)
1085+
# avoid numpy warning of comparisons again None
1086+
if other is None:
1087+
result = not func.__name__ == 'eq'
1088+
else:
1089+
result = func(values, other)
10871090

10881091
# mask if needed
10891092
if isinstance(values_mask, np.ndarray) and values_mask.any():

0 commit comments

Comments
 (0)