warp.where ========== .. currentmodule:: warp._src.lang .. function:: where(cond: bool, value_if_true: Any, value_if_false: Any) -> Any .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(cond: int8, value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(cond: uint8, value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(cond: int16, value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(cond: uint16, value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(cond: int32, value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(cond: uint32, value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(cond: int64, value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(cond: uint64, value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``cond`` is ``True`` then return ``value_if_true``, otherwise return ``value_if_false``. .. function:: where(arr: Array[Any], value_if_true: Any, value_if_false: Any) -> Any :noindex: .. wp-function-tags:: :kernel: true :python: false :differentiable: true Select between two arguments, if ``arr`` is not null then return ``value_if_true``, otherwise return ``value_if_false``.