Skip to content
Snippets Groups Projects
Commit 54efab8e authored by tomrink's avatar tomrink
Browse files

minor

parent 35325aaa
No related branches found
No related tags found
No related merge requests found
......@@ -201,6 +201,7 @@ def minimize_quadratic(xa, xb, xc, ya, yb, yc):
return x_m
# Return index of nda closest to value. nda must be 1d
def value_to_index(nda, value):
diff = np.abs(nda - value)
idx = np.argmin(diff)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment