MCPcopy Create free account
hub / github.com/numpy/numpy / as_ternary

Function as_ternary

numpy/f2py/symbolic.py:1017–1020  ·  view source on GitHub ↗

Return object as TERNARY expression (cond?expr1:expr2).

(cond, expr1, expr2)

Source from the content-addressed store, hash-verified

1015
1016
1017def as_ternary(cond, expr1, expr2):
1018 """Return object as TERNARY expression (cond?expr1:expr2).
1019 """
1020 return Expr(Op.TERNARY, (cond, expr1, expr2))
1021
1022
1023def as_ref(expr):

Callers 6

test_sanityMethod · 0.90
test_tostring_fortranMethod · 0.90
test_tostring_cMethod · 0.90
test_substituteMethod · 0.90
test_fromstringMethod · 0.90
processMethod · 0.85

Calls 1

ExprClass · 0.85

Tested by 5

test_sanityMethod · 0.72
test_tostring_fortranMethod · 0.72
test_tostring_cMethod · 0.72
test_substituteMethod · 0.72
test_fromstringMethod · 0.72