hawk.math.select

Contents

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.

Return type:

Value

Parameters:
  • cond (Any)

  • on_true (Any)

  • on_false (Any)