#NEWLINE# def _select_along_axis( values , idx , axis ) : #NEWLINE# #INDENT# other_ind = np . ix_ ( * [ np . arange ( s ) for s in values . shape ] ) #NEWLINE# sl = ( ( other_ind [ : axis ] + ( idx , ) ) + other_ind [ axis : ] ) #NEWLINE# return values [ sl ]