File tree 2 files changed +0
-27
lines changed
2 files changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -1120,31 +1120,6 @@ def _create_arithmetic_method(cls, op):
1120
1120
def _create_comparison_method (cls , op ):
1121
1121
return cls ._create_method (op , coerce_to_dtype = False )
1122
1122
1123
- '''
1124
- def validate_comp_other(comp, list_to_array=False, validate_len=False,
1125
- zerodim=False, inst_from_senior_cls=False):
1126
- def wrapper(self, other):
1127
- if list_to_array is True:
1128
- if is_list_like(other):
1129
- other = np.asarray(other)
1130
-
1131
- if validate_len is True:
1132
- if is_list_like(other) and len(other) != len(self):
1133
- raise ValueError("Lenghts must match")
1134
-
1135
- if zerodim is True:
1136
- import pandas._libs as lib
1137
- other = lib.item_from_zerodim(other)
1138
-
1139
- if inst_from_senior_cls is True:
1140
- if isinstance(other, (ABCDataFrame, ABCSeries, ABCIndexClass)):
1141
- # Rely on pandas to unbox and dispatch to us.
1142
- return NotImplemented
1143
-
1144
- comp(self, other)
1145
- return wrapper
1146
- '''
1147
-
1148
1123
1149
1124
class CompWrapper (object ):
1150
1125
__key__ = ['list_to_array' , 'validate_len' ,
Original file line number Diff line number Diff line change @@ -147,8 +147,6 @@ def wrapper(self, other):
147
147
result .fill (nat_result )
148
148
elif lib .is_scalar (other ) or np .ndim (other ) == 0 :
149
149
return ops .invalid_comparison (self , other , op )
150
- #elif len(other) != len(self):
151
- # raise ValueError("Lengths must match")
152
150
else :
153
151
if isinstance (other , list ):
154
152
try :
You can’t perform that action at this time.
0 commit comments