From 0b28ae99a6b3f32c9bc00c79dc28e92bcb05b233 Mon Sep 17 00:00:00 2001 From: Philipp Arras <parras@mpa-garching.mpg.de> Date: Sun, 13 Jan 2019 16:42:55 +0100 Subject: [PATCH] Rework docstring --- nifty5/minimization/energy_adapter.py | 13 +++++++------ nifty5/operators/energy_operators.py | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/nifty5/minimization/energy_adapter.py b/nifty5/minimization/energy_adapter.py index 24958c762..2712903f8 100644 --- a/nifty5/minimization/energy_adapter.py +++ b/nifty5/minimization/energy_adapter.py @@ -25,18 +25,19 @@ class EnergyAdapter(Energy): Parameters ----------- - op: Operator with a scalar target domain - The expression computing the energy from the input data - constants: list of strings (default: []) position: Field or MultiField The position where the minimization process is started. + op: EnergyOperator + The expression computing the energy from the input data. + constants: list of strings The component names of the operator's input domain which are assumed to be constant during the minimization process. If the operator's input domain is not a MultiField, this must be empty. - want_metric: bool (default: False) - if True, the class will provide a `metric` property. This should only + Default: []. + want_metric: bool + If True, the class will provide a `metric` property. This should only be enabled if it is required, because it will most likely consume - additional resources. + additional resources. Default: False. """ def __init__(self, position, op, constants=[], want_metric=False): diff --git a/nifty5/operators/energy_operators.py b/nifty5/operators/energy_operators.py index 403724d18..59aef7291 100644 --- a/nifty5/operators/energy_operators.py +++ b/nifty5/operators/energy_operators.py @@ -27,6 +27,7 @@ from .simple_linear_operators import VdotOperator class EnergyOperator(Operator): + """Operator which has a scalar domain as target domain.""" _target = DomainTuple.scalar_domain() -- GitLab