Source code for

# This file is part of the pyMOR project (
# Copyright 2013-2018 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (

from pymor.core.defaults import defaults

import numpy as np

[docs]@defaults('seed') def new_random_state(seed=42): """Returns a new |NumPy| :class:`~numpy.random.RandomState`. Parameters ---------- seed Seed to use for initializing the random state. Returns ------- New `RandomState` object. """ return np.random.RandomState(seed)