Skip to content

Commit 3782949

Browse files
committed
WARN: elementwise comparisons with index names, xref #11162
1 parent 07d673f commit 3782949

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4291,7 +4291,7 @@ def _reference_duplicate_name(self, name):
42914291
Returns True if the name refered to in self.names is duplicated.
42924292
"""
42934293
# count the times name equals an element in self.names.
4294-
return np.sum(name == np.asarray(self.names)) > 1
4294+
return sum(name == n for n in self.names) > 1
42954295

42964296
def _format_native_types(self, **kwargs):
42974297
return self.values

0 commit comments

Comments
 (0)