pub fn replace_scalar<T>(a: &mut Array<T>, cond: &Array<bool>, b: f64) where
T: HasAfEnum,
Inplace replace in Array based on a condition
This function does the C-equivalent of the following statement, except that the operation happens on a GPU for all elements simultaneously.
a = cond ? a : b; /// where cond, a are Arrays and b is scalar(f64)
a
is the Array whose element will be replaced with element from b
if corresponding element in cond
Array is True
cond
is the Array with conditional valuesb
is the scalar that will replace the element in output if corresponding element in cond
Array is False
None
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4