Created
May 25, 2014 12:37
-
-
Save tshev/49c4e783159b7ba72c57 to your computer and use it in GitHub Desktop.
Calculate polynomial at point
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# P(x) = 3x^2 + 6x + 1 | |
np.polyval([9, 6, 1], 0) # returns 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment