Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
D2O
Commits
2b433c4a
Commit
2b433c4a
authored
Aug 23, 2017
by
Theo Steininger
Browse files
added missing random.py
parent
223cb5c4
Pipeline
#17149
passed with stage
in 3 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
d2o/random.py
0 → 100644
View file @
2b433c4a
# -*- 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
)
Theo Steininger
@theos
mentioned in issue
#24 (closed)
·
Aug 23, 2017
mentioned in issue
#24 (closed)
mentioned in issue #24
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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