File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11from datetime import datetime , timedelta
22import operator
33from textwrap import dedent
4- from typing import Union
4+ from typing import TypeVar , Union
55import warnings
66
77import numpy as np
@@ -164,6 +164,9 @@ def _new_Index(cls, d):
164164 return cls .__new__ (cls , ** d )
165165
166166
167+ INDEXTYPE = TypeVar ('INDEXTYPE' , bound = 'Index' )
168+
169+
167170class Index (IndexOpsMixin , PandasObject ):
168171 """
169172 Immutable ndarray implementing an ordered, sliceable set. The basic object
@@ -3632,7 +3635,7 @@ def values(self):
36323635 return self ._data .view (np .ndarray )
36333636
36343637 @property
3635- def _values (self ) -> Union [ExtensionArray , Index , np .ndarray ]:
3638+ def _values (self ) -> Union [ExtensionArray , INDEXTYPE , np .ndarray ]:
36363639 # TODO(EA): remove index types as they become extension arrays
36373640 """
36383641 The best array representation.
You can’t perform that action at this time.
0 commit comments