vortex_array::compute

Trait TakeFn

Source
pub trait TakeFn<Array> {
    // Required method
    fn take(
        &self,
        array: &Array,
        indices: &ArrayData,
    ) -> VortexResult<ArrayData>;

    // Provided method
    unsafe fn take_unchecked(
        &self,
        array: &Array,
        indices: &ArrayData,
    ) -> VortexResult<ArrayData> { ... }
}

Required Methods§

Source

fn take(&self, array: &Array, indices: &ArrayData) -> VortexResult<ArrayData>

Create a new array by taking the values from the array at the given indices.

§Panics

Using indices that are invalid for the given array will cause a panic.

Provided Methods§

Source

unsafe fn take_unchecked( &self, array: &Array, indices: &ArrayData, ) -> VortexResult<ArrayData>

Create a new array by taking the values from the array at the given indices.

§Safety

This take variant will not perform bounds checking on indices, so it is the caller’s responsibility to ensure that the indices are all valid for the provided array. Failure to do so could result in out of bounds memory access or UB.

Implementors§