diff --git a/Wrappers/Python/cil/optimisation/operators/Operator.py b/Wrappers/Python/cil/optimisation/operators/Operator.py index c10032fca2..84009fd29b 100644 --- a/Wrappers/Python/cil/optimisation/operators/Operator.py +++ b/Wrappers/Python/cil/optimisation/operators/Operator.py @@ -71,6 +71,15 @@ def norm(self, **kwargs): def set_norm(self, norm=None): '''Sets the norm of the operator to a custom value. + + Parameter + --------- + norm: Positive real valued number of `None` + + Note + ---- + The passed values are cached so that when self.norm() is called, the saved value will be returned and not calculated via the power method. + If `None` is passed, the cache is cleared prompting the function to call the power method to calculate the norm the next time self.norm() is called. ''' if norm is not None: @@ -361,10 +370,16 @@ class ScaledOperator(Operator): of the result of direct and adjoint of the operator with the scalar. For the rest it behaves like the operator it holds. - :param operator: a Operator or LinearOperator - :param scalar: a scalar multiplier + Parameters + ---------- + operator: a Operator or LinearOperator + + scalar: a scalar multiplier + + - Example: + Example + ------- The scaled operator behaves like the following: .. code-block:: python @@ -379,11 +394,6 @@ class ScaledOperator(Operator): ''' def __init__(self, operator, scalar, **kwargs): - '''creator - - :param operator: a Operator or LinearOperator - :param scalar: a scalar multiplier - :type scalar: Number''' super(ScaledOperator, self).__init__(domain_geometry=operator.domain_geometry(), range_geometry=operator.range_geometry()) @@ -420,9 +430,7 @@ def norm(self, **kwargs): return numpy.abs(self.scalar) * self.operator.norm(**kwargs) def is_linear(self): - '''returns whether the operator is linear - - :returns: boolean ''' + '''returns a `boolean` indicating whether the operator is linear ''' return self.operator.is_linear()