Commit d9e5b5ba authored by Martin Reinecke's avatar Martin Reinecke
Browse files

slight wording tweaks

parent a2ca9fd9
Pipeline #75054 passed with stages
in 24 minutes and 52 seconds
......@@ -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 numbers is distributed sequentially
over a multi-domain. In this example, ordering keys differently will change
the resulting :class:`MultiField`.
"""
......
......@@ -120,10 +120,10 @@ class MultiField(Operator):
Notes
-----
The ordering of the keys within a multi-domain WILL change the resulting
:class:`MultiField`. 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 fields within this multi-field will be drawn in alphabetical
order of the multi-field'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):
......
......@@ -277,10 +277,10 @@ def from_random(random_type, domain, dtype=np.float64, **kwargs):
Notes
-----
The ordering of the keys within a multi-domain WILL change the resulting
:class:`MultiField`. 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`.
When called with a multi-domain, the individual fields will be drawn in
alphabetical order of the multi-domain'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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment