From cab65a492bcca7649bbfac57dbe9fd44e7c44d64 Mon Sep 17 00:00:00 2001 From: Akira Sewnath Date: Mon, 12 Aug 2024 08:34:06 -0400 Subject: [PATCH] Bugfix for percentage capture (#207) ## Description Casting `n_throw_out` to `int` to be used as index in `datavar_check = datavar[n_throw_out:-n_throw_out]`. --- src/eva/plotting/batch/base/plot_tools/dynamic_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eva/plotting/batch/base/plot_tools/dynamic_config.py b/src/eva/plotting/batch/base/plot_tools/dynamic_config.py index fc0b2a5..709f92f 100644 --- a/src/eva/plotting/batch/base/plot_tools/dynamic_config.py +++ b/src/eva/plotting/batch/base/plot_tools/dynamic_config.py @@ -82,7 +82,7 @@ def vminvmaxcmap(logger, option_dict, plots_dict, data_collections): n_throw_out = ((100-percentage_capture) * n / 100) / 2 # The value needs to be an integer - n_throw_out = np.floor(n_throw_out) + n_throw_out = np.floor(n_throw_out).astype(int) # Create new array with only the data to consider if n_throw_out == 0: