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
e9638875
Commit
e9638875
authored
Mar 19, 2020
by
Martin Reinecke
Browse files
better names
parent
d82f28b2
Pipeline
#70988
failed with stages
in 4 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
demos/getting_started_1.py
View file @
e9638875
...
...
@@ -46,7 +46,7 @@ def make_random_mask():
if
__name__
==
'__main__'
:
ift
.
random
.
init
(
42
)
ift
.
random
.
seed
(
42
)
# Choose space on which the signal field is defined
if
len
(
sys
.
argv
)
==
2
:
...
...
nifty6/random.py
View file @
e9638875
...
...
@@ -19,14 +19,14 @@ import numpy as np
_initialized
=
False
def
init
(
seed
):
def
seed
(
_
seed
):
global
_initialized
if
_initialized
:
print
(
"WARNING: re-intializing random generator"
)
np
.
random
.
seed
(
seed
)
#
print("WARNING: re-intializing random generator")
np
.
random
.
seed
(
_
seed
)
else
:
_initialized
=
True
np
.
random
.
seed
(
seed
)
np
.
random
.
seed
(
_
seed
)
def
pm1
(
dtype
,
shape
):
global
_initialized
...
...
Write
Preview
Supports
Markdown
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