@@ -929,19 +929,20 @@ def astype(self, dtype, copy=True):
929929
930930 Parameters
931931 ----------
932- indices : list
932+ indices : array-like
933933 Indices to be taken.
934934 axis : int, optional
935935 The axis over which to select values, always 0.
936936 allow_fill : bool, default True
937- fill_value : bool , default None
937+ fill_value : scalar , default None
938938 If allow_fill=True and fill_value is not None, indices specified by
939- -1 is regarded as NA. If Index doesn't hold NA, raise ValueError.
939+ -1 are regarded as NA. If Index doesn't hold NA, raise ValueError.
940940
941941 Returns
942942 -------
943- numpy.ndarray
944- Elements of given indices.
943+ Index
944+ An index formed of elements at the given indices. Will be the same
945+ type as self, except for RangeIndex.
945946
946947 See Also
947948 --------
@@ -950,7 +951,9 @@ def astype(self, dtype, copy=True):
950951 """
951952
952953 @Appender (_index_shared_docs ["take" ] % _index_doc_kwargs )
953- def take (self , indices , axis = 0 , allow_fill = True , fill_value = None , ** kwargs ):
954+ def take (
955+ self , indices , axis : int = 0 , allow_fill : bool = True , fill_value = None , ** kwargs
956+ ):
954957 if kwargs :
955958 nv .validate_take ((), kwargs )
956959 indices = ensure_platform_int (indices )
0 commit comments