#NEWLINE# def index_within_subset( self , indexable , subset_request , sort_indices = False ) : #NEWLINE# #INDENT# 'Index an indexable object within the context of this subset.\n\n        Parameters\n        ----------\n        indexable : indexable object\n            The object to index through.\n        subset_request : :class:`list` or :class:`slice`\n            List of positive integer indices or slice that constitutes\n            the request *within the context of this subset*. This\n            request will be translated to a request on the indexable\n            object.\n        sort_indices : bool, optional\n            If the request is a list of indices, indexes in sorted order\n            and reshuffles the result in the original order. Defaults to\n            `False`.\n\n        ' #NEWLINE# if isinstance ( subset_request , numbers . Integral ) : #NEWLINE# #INDENT# ( request , ) = self [ [ subset_request ] ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# request = self [ subset_request ] #NEWLINE# #UNINDENT# if ( isinstance ( request , numbers . Integral ) or hasattr ( request , 'step' ) ) : #NEWLINE# #INDENT# return indexable [ request ] #NEWLINE# #UNINDENT# if sort_indices : #NEWLINE# #INDENT# return self . sorted_fancy_indexing ( indexable , request ) #NEWLINE# #UNINDENT# if isinstance ( indexable , ( numpy . ndarray , h5py . Dataset ) ) : #NEWLINE# #INDENT# return indexable [ request ] #NEWLINE# #UNINDENT# return iterable_fancy_indexing ( subset_request , request )