Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
D2O
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
22
Issues
22
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
D2O
Commits
2b433c4a
Commit
2b433c4a
authored
Aug 23, 2017
by
Theo Steininger
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
d2o/random.py
d2o/random.py
+15
-0
No files found.
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
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