menu
select
import { select } from "destack";
Select tensor elements from thenValue or elseValue.
Per-lane conditional select.
Returns a[i] if mask[i] is true, otherwise b[i], for each lane.
1export declare function select<T, const Rank: usize>(mask: Tensor<boolean, Rank>, thenValue: Tensor<T, Rank>, elseValue: Tensor<T, Rank>, options?: TensorOutputOptions<T, Rank> | undefined): Tensor<T, Rank>1export declare function select<T, const N: usize>(mask: Vector<boolean, N>, a: Vector<T, N>, b: Vector<T, N>): Vector<T, N>