chainerx.take

chainerx.take(a, indices, axis)

Takes elements from an array along an axis.

Parameters
  • a (ndarray) – Source array.

  • indices (ndarray) – The indices of the values to extract. When indices are out of bounds, they are wrapped around.

  • axis (int) – The axis over which to select values.

Returns

Output array.

Return type

ndarray()

Note

This function currently only supports indices of int64 array.

Note

This function currently does not support axis=None

Note

During backpropagation, this function propagates the gradient of the output array to the input array a.

See also

numpy.take()