modern rng approach

This commit is contained in:
Jan Petykiewicz 2024-07-30 23:19:07 -07:00
parent 50b30d31fb
commit 7f620a9bb3

View File

@ -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 = []