Skip to content

Instantly share code, notes, and snippets.

@tshev
Created May 24, 2014 20:21
Show Gist options
  • Save tshev/d1c57af9b27480c44f81 to your computer and use it in GitHub Desktop.
Save tshev/d1c57af9b27480c44f81 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import scipy
import scipy.linalg
def f(a):
s = 0
for i in range(len(a)):
s+= a[i]*x**i
return s
def check(roots):
for x in roots:
print x, "=>", f(x)
check(scipy.roots[-1,-2, 3, 0, 0, 5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment