radarx.fundamentals.common.ensure_positive#

radarx.fundamentals.common.ensure_positive(value, name='value')[source]#

Raise a ValueError if the input value is not positive.

Parameters:
  • value (float) – Numeric value to validate.

  • name (str) – Optional name of the variable for error messages.

Returns:

float – The validated positive value.

Raises:

ValueError – If the value is not positive.