Skip to content

Commit

Permalink
Another Missing Deleted Function (#364)
Browse files Browse the repository at this point in the history
Replacing another deleted function.
  • Loading branch information
kjkoeller authored Apr 22, 2024
1 parent f8ea622 commit 67b1b0f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions EclipsingBinaries/vseq_updated.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,25 @@ def Newton(f, x0, e=1e-8, fprime=None, max_iter=None, dx=1e-8, central_diff=True
return x

class poly:
def result(coeflist, value, deriv=False):
"""
Result of a polynomial given an ascending order coefficient list, and
an x value.
"""
# n0=0
# n=n0
# termlist=[]
# while(n<len(coeflist)):
# termlist.append(coeflist[n]*value**n)
# n+=1
# return sum(termlist)
# deg = len(coeflist)-1
# coeflist=np.array(coeflist)
# if deriv == True:
#

return sum(np.array(coeflist) * value ** np.arange(len(coeflist)))

def error(coeflist, value, error):
"""
Propagated uncertainty of a standard polynomial.
Expand Down

0 comments on commit 67b1b0f

Please sign in to comment.