hawk.math.select#
- hawk.math.select(cond, on_true, on_false)[source]#
cond ? a: b— what the ast pass rewrites control flow into. Component-wise on a vector or matrix: the mask is rank-0 or the branches’ shape, and a rank-0 branch broadcasts. A bareintbranch takes the type of the other branch when that is an integer (asx + 1does).- Return type:
- Parameters:
cond (Any)
on_true (Any)
on_false (Any)