From c0d23a731badc99aff32120b73a91cc6aa8f6f0f Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 15 Jul 2019 10:43:18 +0200 Subject: [PATCH] Eliminate side effects from debug function Signed-off-by: Jim Martens --- src/twomartens/masterthesis/debug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twomartens/masterthesis/debug.py b/src/twomartens/masterthesis/debug.py index c7ca527..5b6bbfc 100644 --- a/src/twomartens/masterthesis/debug.py +++ b/src/twomartens/masterthesis/debug.py @@ -83,7 +83,7 @@ def save_ssd_train_images(images: np.ndarray, labels: np.ndarray, xmax = instance[5] ymax = instance[6] else: - instance = np.asarray(instance) + instance = np.copy(instance) class_id = np.argmax(instance[:-12], axis=0) instance[-12:-8] *= instance[-4:] # multiply with variances instance[[-11, -9]] *= np.expand_dims(instance[-5] - instance[-7], axis=-1)