We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33173a4 commit 80aad0dCopy full SHA for 80aad0d
pandas/core/indexes/base.py
@@ -99,9 +99,14 @@ def cmp_method(self, other):
99
# don't pass MultiIndex
100
with np.errstate(all='ignore'):
101
result = ops._comp_method_OBJECT_ARRAY(op, self.values, other)
102
+
103
else:
- with np.errstate(all='ignore'):
104
- result = op(self.values, np.asarray(other))
105
+ # numpy will show a DeprecationWarning on invalid elementwise
106
+ # comparisons, this will raise in the future
107
+ with warnings.catch_warnings(record=True):
108
+ with np.errstate(all='ignore'):
109
+ result = op(self.values, np.asarray(other))
110
111
# technically we could support bool dtyped Index
112
# for now just return the indexing array directly
0 commit comments