Truncate string rather than integer
@@ -623,7 +623,7 @@ class RandomState(object):
seed = numpy.uint64(time.clock() * 1000000)
else:
if isinstance(seed, numpy.ndarray):
- seed = int(hashlib.md5(seed).hexdigest(), 16) % 2 ** 64
+ seed = int(hashlib.md5(seed).hexdigest()[:16], 16)
seed = numpy.asarray(seed).astype(numpy.uint64, casting='safe')
curand.setPseudoRandomGeneratorSeed(self._generator, seed)
