Skip to content
Snippets Groups Projects

Highlight that keys in a multi-domain are sorted

Merged Gordian Edenhofer requested to merge nifty6_multi_domain_keys into NIFTy_6
3 files
+ 42
3
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 12
3
@@ -22,9 +22,18 @@ from .utilities import frozendict, indent
class MultiDomain(object):
"""A tuple of domains corresponding to a direct sum.
This class is the domain of the direct sum of fields defined
on (possibly different) domains. To make an instance
of this class, call `MultiDomain.make(inp)`.
This class is the domain of the direct sum of fields defined on (possibly
different) domains. To make an instance of this class, call
`MultiDomain.make(inp)`.
Notes
-----
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 numbers is distributed sequentially
over a multi-domain. In this example, ordering keys differently will change
the resulting :class:`MultiField`.
"""
_domainCache = {}
Loading