From f0c6e0278106a211c9a5d3ed4c319a245dfa2527 Mon Sep 17 00:00:00 2001 From: Sai Suraj Date: Sun, 16 Apr 2023 15:36:57 +0530 Subject: [PATCH] Renamed a variable from max to maxi in plot_pml_comparison.py file as 'max' is an inbuilt function name. --- testing/models_pmls/plot_pml_comparison.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/models_pmls/plot_pml_comparison.py b/testing/models_pmls/plot_pml_comparison.py index 2acf1ecf..a713ebf4 100644 --- a/testing/models_pmls/plot_pml_comparison.py +++ b/testing/models_pmls/plot_pml_comparison.py @@ -93,8 +93,8 @@ for x, model in enumerate(testmodels): # Diffs datadiffs = np.zeros(datatest.shape, dtype=np.float64) for i in range(len(outputstest)): - max = np.amax(np.abs(dataref[:, i])) - datadiffs[:, i] = np.divide(np.abs(datatest[:, i] - dataref[:, i]), max, out=np.zeros_like(dataref[:, i]), where=max != 0) # Replace any division by zero with zero + maxi = np.amax(np.abs(dataref[:, i])) + datadiffs[:, i] = np.divide(np.abs(datatest[:, i] - dataref[:, i]), maxi, out=np.zeros_like(dataref[:, i]), where=maxi != 0) # Replace any division by zero with zero # Calculate power (ignore warning from taking a log of any zero values) with np.errstate(divide='ignore'):