take

Function take 

Source
pub fn take(
    array: &(dyn Array + 'static),
    indices: &(dyn Array + 'static),
) -> Result<Arc<dyn Array>, VortexError>
Expand description

Creates a new array using the elements from the input array indexed by indices.

For example, if we have an array [1, 2, 3, 4, 5] and indices [4, 2], the resulting array would be [5, 3].

The output array will have the same length as the indices array.