little change before i paste ai code

This commit is contained in:
lda committed 2025-02-14 04:19:23 +07:00
1 parent 34eab5446c
commit cb9d7236f1
2 files changed
+60 -8

No files matched your search

+9 -6
View File
@@ -5,13 +5,15 @@ ass
"""
import numpy
import scipy
import sympy
import numpy.linalg
import scipy.linalg
import numpy.polynomial
import scipy
import scipy.linalg
import scipy.optimize
import sympy
scipy.linalg.eig
scipy.linalg.companion
@@ -21,12 +23,13 @@ p = numpy.polynomial.Polynomial(ce).roots()
x_sym = sympy.Symbol("x")
f = x_sym**3 -7 * x_sym + 6
f = x_sym**3 - 7 * x_sym + 6
c = sympy.solve(f, x_sym)
print(p)
print(c)
def system(x_y): # trait Index<usize> for ndarray
x, y = x_y
u = x**2 + x * y - 10
@@ -34,8 +37,8 @@ def system(x_y): # trait Index<usize> for ndarray
return u, v
r = scipy.optimize.fsolve(system, (0, 0))
r = scipy.optimize.fsolve(system, (0, 0))
# look this is way better than matlab where you have a separate options function? stinky?
# pass this big boi a **options and you are set for life
print(r)
print(r)