Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
604044cd
Commit
604044cd
authored
Mar 19, 2020
by
Martin Reinecke
Browse files
Merge branch 'random_paranoia' into 'NIFTy_6'
Be more paranoid about initializing the RNG See merge request
!426
parents
ad4c6cde
2a2c32b1
Pipeline
#71007
passed with stages
in 17 minutes and 21 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/__init__.py
View file @
604044cd
from
.version
import
__version__
from
.
import
random
random
.
seed
(
42
)
from
.domains.domain
import
Domain
from
.domains.structured_domain
import
StructuredDomain
from
.domains.unstructured_domain
import
UnstructuredDomain
...
...
nifty6/random.py
View file @
604044cd
...
...
@@ -11,13 +11,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-20
19
Max-Planck-Society
# Copyright(C) 2013-20
20
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
import
numpy
as
np
def
seed
(
seed
):
np
.
random
.
seed
(
seed
)
class
Random
(
object
):
@
staticmethod
def
pm1
(
dtype
,
shape
):
...
...
Gordian Edenhofer
@gedenhof
mentioned in issue
#289 (closed)
·
Mar 25, 2020
mentioned in issue
#289 (closed)
mentioned in issue #289
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment