@@ -180,13 +180,10 @@ def _validate_shift_value(self, fill_value):
180
180
return self ._validate_fill_value (fill_value )
181
181
182
182
def __setitem__ (self , key , value ):
183
- key = self . _validate_setitem_key ( key )
183
+ key = check_array_indexer ( self , key )
184
184
value = self ._validate_setitem_value (value )
185
185
self ._ndarray [key ] = value
186
186
187
- def _validate_setitem_key (self , key ):
188
- return check_array_indexer (self , key )
189
-
190
187
def _validate_setitem_value (self , value ):
191
188
return value
192
189
@@ -198,18 +195,15 @@ def __getitem__(self, key):
198
195
return self ._box_func (result )
199
196
return self ._from_backing_data (result )
200
197
201
- key = self ._validate_getitem_key (key )
198
+ key = extract_array (key , extract_numpy = True )
199
+ key = check_array_indexer (self , key )
202
200
result = self ._ndarray [key ]
203
201
if lib .is_scalar (result ):
204
202
return self ._box_func (result )
205
203
206
204
result = self ._from_backing_data (result )
207
205
return result
208
206
209
- def _validate_getitem_key (self , key ):
210
- key = extract_array (key , extract_numpy = True )
211
- return check_array_indexer (self , key )
212
-
213
207
@doc (ExtensionArray .fillna )
214
208
def fillna (self : _T , value = None , method = None , limit = None ) -> _T :
215
209
value , method = validate_fillna_kwargs (value , method )
0 commit comments