take(a, indices, axis)¶
Takes elements from an array along an axis.
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.
mode (str) – Specifies how out-of-bounds indices will behave. ‘raise’ - raise an error ‘wrap’ - wrap around ‘clip’ - clip to the range
- Return type
This function currently does not support
During backpropagation, this function propagates the gradient of the output array to the input array
The default mode for the native backend is ‘raise’, while for the cuda backend is ‘wrap’ in order to prevent device synchronization. ‘raise’ mode is currently not supported in the CUDA backend.