Commit 91e6309a authored by Martin Reinecke's avatar Martin Reinecke
Browse files

add ducktape docs

parent 29d1e69a
......@@ -109,6 +109,34 @@ class FieldAdapter(LinearOperator):
def ducktape(left, right, name):
"""Convenience function for computing an adapter between two operators.
left : None, Operator, or Domainoid
Something describing the input domain of the left operator.
If `left` is an `Operator`, its domain is used as `left`.
right : None, Operator, or Domainoid
Something describing the target domain of the right operator.
If `right` is an `Operator`, its target is used as `right`.
name : string
The component of the `MultiDomain` that will be extracted/inserted
- one of the involved domains must be a `DomainTuple`, the other a
- `left` and `right` must not be both `None`, but one of them can (and
probably should) be `None`. In this case, the missing information is
FieldAdapter : an adapter operator converting between the two (possibly
partially inferred) domains.
from ..sugar import makeDomain
from .operator import Operator
if left is None: # need to infer left from right
Supports Markdown
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