aesara.tensor.take_along_axis

aesara.tensor.take_along_axis#

aesara.tensor.take_along_axis(arr, indices, axis=0)[source]#

Take values from the input array by matching 1d index and data slices.

This iterates over matching 1d slices oriented along the specified axis in the index and data arrays, and uses the former to look up values in the latter. These slices can be different lengths.

Functions returning an index along an axis, like argsort and argpartition, produce suitable indices for this function.