Commit 2b433c4a authored by Theo Steininger's avatar Theo Steininger

added missing random.py

parent 223cb5c4
Pipeline #17149 passed with stage
in 3 minutes and 33 seconds
# -*- coding: utf-8 -*-
import numpy as np
from d2o.config import configuration as gc,\
dependency_injector as gdi
MPI = gdi[gc['mpi_module']]
comm = gc['default_comm']
rank = comm.rank
def seed(seed=None):
seed = rank if seed is None else np.uint32(seed) + rank
np.random.seed(seed)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment