cupy.take_along_axis#

cupy.take_along_axis(a, indices, axis)[source]#

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

Parameters:
  • a (cupy.ndarray) – Array to extract elements.

  • indices (cupy.ndarray) – Indices to take along each 1d slice of a.

  • axis (int) – The axis to take 1d slices along.

Returns:

The indexed result.

Return type:

cupy.ndarray