@@ -180,13 +180,10 @@ def _validate_shift_value(self, fill_value):
180180 return self ._validate_fill_value (fill_value )
181181
182182 def __setitem__ (self , key , value ):
183- key = self . _validate_setitem_key ( key )
183+ key = check_array_indexer ( self , key )
184184 value = self ._validate_setitem_value (value )
185185 self ._ndarray [key ] = value
186186
187- def _validate_setitem_key (self , key ):
188- return check_array_indexer (self , key )
189-
190187 def _validate_setitem_value (self , value ):
191188 return value
192189
@@ -198,18 +195,15 @@ def __getitem__(self, key):
198195 return self ._box_func (result )
199196 return self ._from_backing_data (result )
200197
201- key = self ._validate_getitem_key (key )
198+ key = extract_array (key , extract_numpy = True )
199+ key = check_array_indexer (self , key )
202200 result = self ._ndarray [key ]
203201 if lib .is_scalar (result ):
204202 return self ._box_func (result )
205203
206204 result = self ._from_backing_data (result )
207205 return result
208206
209- def _validate_getitem_key (self , key ):
210- key = extract_array (key , extract_numpy = True )
211- return check_array_indexer (self , key )
212-
213207 @doc (ExtensionArray .fillna )
214208 def fillna (self : _T , value = None , method = None , limit = None ) -> _T :
215209 value , method = validate_fillna_kwargs (value , method )
0 commit comments