From 88c81a905b3bec6c70910cca3cd0c5570b67b2d5 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 2 Aug 2024 18:50:52 +0200 Subject: [PATCH] use ndarray.copy consistently --- dap/algos/radprof.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dap/algos/radprof.py b/dap/algos/radprof.py index 9cdd601..ed7c5be 100644 --- a/dap/algos/radprof.py +++ b/dap/algos/radprof.py @@ -21,7 +21,7 @@ def calc_radial_integration(results, data, pixel_mask_pf, center, rad, norm): if apply_threshold and all(k in results for k in ("threshold_min", "threshold_max")): threshold_min = float(results["threshold_min"]) threshold_max = float(results["threshold_max"]) - data = np.copy(data) # do the following in-place changes on a copy + data = data.copy() # do the following in-place changes on a copy data[data < threshold_min] = np.nan #TODO: skipping max is a guess, but not obvious/symmetric -- better to ensure the order min < max by switching them if needed if threshold_max > threshold_min: