HyperGP.tensor.where#
- where(condition, true_array, false_array)[source]#
Return elements choosen from true_array or false_array depending on the condition
- Parameters:
condition (Tensor or array_like) – Choose the element in true_array if the corresponding value in condition is true else choose the element in false_array
true_array (Tensor or array_like) – Values from which to choose
false_array (Tensor or array_like) – Values from which to choose
- Returns:
A new array in which elements from true_array(correponding index in condition is true) and false_array(correponding index in bool_array is false).
- Return type:
ret(Tensor)