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
NIFTy
Commits
d9e5b5ba
Commit
d9e5b5ba
authored
May 16, 2020
by
Martin Reinecke
Browse files
slight wording tweaks
parent
a2ca9fd9
Pipeline
#75054
passed with stages
in 24 minutes and 52 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/multi_domain.py
View file @
d9e5b5ba
...
...
@@ -31,7 +31,7 @@ class MultiDomain(object):
For consistency and to be independent of the order of insertion, the keys
within a multi-domain are sorted. Hence, renaming a domain may result in it
being placed at a different index within a multi-domain. This is especially
important if a sequence of e.g. random number
are
distributed sequentially
important if a sequence of
,
e.g.
,
random number
s is
distributed sequentially
over a multi-domain. In this example, ordering keys differently will change
the resulting :class:`MultiField`.
"""
...
...
nifty6/multi_field.py
View file @
d9e5b5ba
...
...
@@ -120,10 +120,10 @@ class MultiField(Operator):
Notes
-----
The
ordering of the key
s within
a
multi-
domain WILL change the resulting
:class:`M
ulti
F
ield
`. Note, since keys in a :class:`MultiDomain` are sorted,
renaming keys may also impacts the ordering of the generated
random numbers
within the returned :class:`MultiField`
.
The
individual field
s within
this
multi-
field will be drawn in alphabetical
order of the m
ulti
-f
ield
's domain keys. As a consequence, renaming these
keys may cause the multi-field to be filled with different
random numbers
,
even for the same initial RNG state
.
"""
domain
=
MultiDomain
.
make
(
domain
)
if
isinstance
(
dtype
,
dict
):
...
...
nifty6/sugar.py
View file @
d9e5b5ba
...
...
@@ -277,10 +277,10 @@ def from_random(random_type, domain, dtype=np.float64, **kwargs):
Notes
-----
T
he
ordering of the keys
with
in
a multi-domain
WILL change the result
in
g
:class:`MultiField`. Note, since keys in a :class:`M
ulti
D
omain
` are sorted
,
renaming keys may
also impacts the ordering of the generated random numbers
within the returned :class:`MultiField`
.
W
he
n called
with a multi-domain
, the individual fields will be drawn
in
alphabetical order of the m
ulti
-d
omain
's domain keys. As a consequence
,
renaming
these
keys may
cause the multi-field to be filled with different
random numbers, even for the same initial RNG state
.
"""
if
isinstance
(
domain
,
(
dict
,
MultiDomain
)):
return
MultiField
.
from_random
(
random_type
,
domain
,
dtype
,
**
kwargs
)
...
...
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