diff --git a/opencl_fdtd/test_simulation.py b/opencl_fdtd/test_simulation.py index c68a2cf..9c8649a 100644 --- a/opencl_fdtd/test_simulation.py +++ b/opencl_fdtd/test_simulation.py @@ -323,8 +323,9 @@ class JdotE_3DUniformDX(unittest.TestCase): self.epsilon = numpy.full(shape, 4, dtype=float) self.epsilon[self.src_mask] = 2 - e = numpy.random.randint(-128, 128 + 1, size=shape).astype(float) - h = numpy.random.randint(-128, 128 + 1, size=shape).astype(float) + rng = numpy.random.default_rng() + e = rng.integers(-128, 128 + 1, size=shape, dtype=float) + h = rng.integers(-128, 128 + 1, size=shape, dtype=float) self.es = [e] self.hs = [h] self.ss = []