summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/bohrium/pyadd.py
blob: fc9f6968dfcf10e50b70945ab87d8cccf6ebd32f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env python
import bohrium as bh
a = bh.array([1, 2, 3])
b = bh.array([3, 4, 5])
c = a + b

if bh.all(c == bh.array([4, 6, 8])):
    print("Success!")
else:
    print("Failure, values not as expected.")