Created
June 27, 2018 23:53
-
-
Save WillKoehrsen/770924cfe8c55787371ed219f48cd23b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
def objective(x): | |
"""Objective function to minimize""" | |
# Create the polynomial object | |
f = np.poly1d([1, -2, -28, 28, 12, -26, 100]) | |
# Return the value of the polynomial | |
return f(x) * 0.05 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment