mirror of https://github.com/m-labs/artiq.git
test/lit: Add smoke test for math function broadcasting
This commit is contained in:
parent
1c645d8857
commit
8eddb9194a
|
@ -0,0 +1,15 @@
|
|||
# RUN: %python -m artiq.compiler.testbench.embedding %s
|
||||
|
||||
from artiq.language.core import *
|
||||
import numpy as np
|
||||
|
||||
@kernel
|
||||
def entrypoint():
|
||||
# Just make sure everything compiles.
|
||||
a = np.array([1.0, 2.0, 3.0])
|
||||
b = np.sin(a)
|
||||
assert b.shape == a.shape
|
||||
|
||||
c = np.array([1.0, 2.0, 3.0])
|
||||
d = np.arctan(c)
|
||||
assert d.shape == c.shape
|
Loading…
Reference in New Issue