Skip to content

Commit

Permalink
Merge pull request #1879 from xushiwei/q
Browse files Browse the repository at this point in the history
pydemo: matrix
  • Loading branch information
xushiwei committed May 17, 2024
2 parents f8f2efa + 210cb64 commit 614a46e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions testdata/_llgo/matrix/matrix.gop
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import (
"c"
"py"
"py/numpy"
)

a := py.list(
py.list(1.0, 2.0, 3.0),
py.list(4.0, 5.0, 6.0),
py.list(7.0, 8.0, 9.0),
)
b := py.list(
py.list(9.0, 8.0, 7.0),
py.list(6.0, 5.0, 4.0),
py.list(3.0, 2.0, 1.0),
)
x := numpy.add(a, b)
c.printf C"a+b = %s\n", x.str.cStr

0 comments on commit 614a46e

Please sign in to comment.