Skip to content

Commit 689a015

Browse files
use np to solve equation
1 parent df9eda9 commit 689a015

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ufo/equation.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import numpy as np
2+
3+
4+
def main():
5+
first_equation()
6+
7+
8+
def first_equation():
9+
a = np.array([[3, 1], [1,2]])
10+
b = np.array([9, 8])
11+
result = np.linalg.solve(a, b)
12+
print(result)
13+
14+
15+
if __name__ == "__main__":
16+
main()

0 commit comments

Comments
 (0)