Skip to content
Snippets Groups Projects
Commit ecbbdf72 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

use np.concatenate

parent 805a4b26
No related branches found
No related tags found
1 merge request!447Add sqrt; fix domains in function testsuite; update freeze of sp.Pow
......@@ -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.),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment