From ecbbdf72fe3338c223124453d01bd2fb92864fa6 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Wed, 29 Jan 2025 10:35:44 +0100 Subject: [PATCH] use np.concatenate --- tests/kernelcreation/test_functions.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/kernelcreation/test_functions.py b/tests/kernelcreation/test_functions.py index 6f82f5aa0..a4d154d4b 100644 --- a/tests/kernelcreation/test_functions.py +++ b/tests/kernelcreation/test_functions.py @@ -56,7 +56,7 @@ def function_domain(function_name, dtype): case ( "exp" | "sin" | "cos" | "sinh" | "cosh" | "atan" | "abs" | "floor" | "ceil" ): - return np.concat( + return np.concatenate( [ [0.0, -1.0, 1.0], rng.uniform(-0.1, 0.1, 5), @@ -65,21 +65,21 @@ def function_domain(function_name, dtype): ] ).astype(dtype) case "tan": - return np.concat( + return np.concatenate( [ [0.0, -1.0, 1.0], rng.uniform(-np.pi / 2.0 + eps, np.pi / 2.0 - eps, 13), ] ).astype(dtype) case "asin" | "acos": - return np.concat( + return np.concatenate( [ [0.0, 1.0, -1.0], rng.uniform(-1.0, 1.0, 13), ] ).astype(dtype) case "log" | "sqrt": - return np.concat( + return np.concatenate( [ [1.0], rng.uniform(eps, 0.1, 7), @@ -88,13 +88,13 @@ def function_domain(function_name, dtype): ] ).astype(dtype) case "min" | "max" | "atan2": - return np.concat( + return np.concatenate( [ rng.uniform(-0.1, 0.1, 8), rng.uniform(-5.0, 5.0, 8), rng.uniform(-10, 10, 8), ] - ).astype(dtype), np.concat( + ).astype(dtype), np.concatenate( [ rng.uniform(-0.1, 0.1, 8), rng.uniform(-5.0, 5.0, 8), @@ -104,13 +104,13 @@ def function_domain(function_name, dtype): dtype ) case "pow": - return np.concat( + return np.concatenate( [ [0., 1., 1.], rng.uniform(-1., 1., 8), rng.uniform(0., 5., 8), ] - ).astype(dtype), np.concat( + ).astype(dtype), np.concatenate( [ [1., 0., 2.], np.arange(2., 10., 1.), -- GitLab