[−][src]Function arrayfire::selectr
pub fn selectr<T>(a: &Array<T>, cond: &Array<bool>, b: f64) -> Array<T> where
T: HasAfEnum,
Element wise conditional operator for Arrays
This function does the C-equivalent of the following statement, except that the operation happens on a GPU for all elements simultaneously.
c = cond ? a : b; /// where a is Array and b is a scalar(f64)
Parameters
a
is the Array whose element will be assigned to output if corresponding element incond
Array isTrue
cond
is the Array with conditional valuesb
is the scalar that is assigned to output if corresponding element incond
Array isFalse
Return Values
An Array