wsnsim/auxiliary_functions.py
def ensure_positive_value(function: Callable[..., float]) \
        -> Callable[..., float]:
    """Used as a decorator.

    Ensures that the value is 0 or positive.
    """
    def inner(*args, **kwargs):
        """Ensures that the value is 0 or positive."""
        value = function(*args, **kwargs)
        if value < 0:
            raise ValueError('Value obtained is negative')
        return value
    return inner
Used as a decorator.

    Ensures that the value is 0 or positive.
    
Used as a decorator.
Ensures that the value is 0 or positive.
Used as a decorator . Ensures that the value is 0 or positive .
def ensure_positive_value(function: Callable[..., float]) \
        -> Callable[..., float]:
    def inner(*args, **kwargs):
        value = function(*args, **kwargs)
        if value < 0:
            raise ValueError('Value obtained is negative')
        return value
    return inner
def ensure_positive_value ( function : Callable [ ... , float ] ) -> Callable [ ... , float ] : def inner ( * args , ** kwargs ) : """Ensures that the value is 0 or positive.""" value = function ( * args , ** kwargs ) if value < 0 : raise ValueError ( 'Value obtained is negative' ) return value return inner
Used as a decorator.
Used as a decorator .
"""Used as a decorator.

    Ensures that the value is 0 or positive.
    """ """Ensures that the value is 0 or positive."""
function
Callable[..., float]