From d9f87ac51553b51f5225eca6e5de7e7888ae2493 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Fri, 5 Jul 2024 10:36:41 -0500 Subject: [PATCH] snapshot --- modules/util/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/util/util.py b/modules/util/util.py index 5831c5ba..872ed3d7 100644 --- a/modules/util/util.py +++ b/modules/util/util.py @@ -291,7 +291,8 @@ def minimize_quadratic(xa, xb, xc, ya, yb, yc): return x_m -# Return index of nda closest to value. nda must be 1d +# Return index of nda closest to value. nda (numpy.ndarray) must be 1d. If multiple occurrences should arise, +# the first is returned according to NumPy's argmin/max function. def value_to_index(nda, value): diff = np.abs(nda - value) idx = np.argmin(diff) -- GitLab