Exemplo n.º 1
0
 def f(pred):
     assert python_should_be_running
     checkify.assert_(pred, "foo")
Exemplo n.º 2
0
 def f():
     checkify.assert_(False, "hi")
Exemplo n.º 3
0
 def f(x):
     checkify.assert_(x > 0, "must be positive!")
     return jnp.log(x)
Exemplo n.º 4
0
 def multi_errors(x):
     x = x / 0  # DIV
     x = jnp.sin(x)  # NAN
     x = x[500]  # OOB
     checkify.assert_(x < 0, "must be negative!")  # ASSERT
     return x