mlrl.common.cython.validation module

Author: Michael Rapp (michael.rapp.ml@gmail.com)

mlrl.common.cython.validation.assert_greater(name: str, value, threshold)

Raises a ValueError if a given value is not greater than a specific threshold.

Parameters:
  • name – The name of the parameter, the value corresponds to

  • value – The value

  • threshold – The threshold

mlrl.common.cython.validation.assert_greater_or_equal(name: str, value, threshold)

Raises a ValueError if a given value is not greater or equal to a specific threshold.

Parameters:
  • name – The name of the parameter, the value corresponds to

  • value – The value

  • threshold – The threshold

mlrl.common.cython.validation.assert_less(name: str, value, threshold)

Raises a ValueError if a given value is not less than a specific threshold.

Parameters:
  • name – The name of the parameter, the value corresponds to

  • value – The value

  • threshold – The threshold

mlrl.common.cython.validation.assert_less_or_equal(name: str, value, threshold)

Raises a ValueError if a given value is not less or equal to a specific threshold.

Parameters:
  • name – The name of the parameter, the value corresponds to

  • value – The value

  • threshold – The threshold

mlrl.common.cython.validation.assert_multiple(name: str, value, other)

Raises a ValueError if a given value is not a multiple of another value.

Parameters:
  • name – The name of the parameter, the value corresponds to

  • value – The value that should be a multiple of other

  • other – The other value

mlrl.common.cython.validation.assert_not_none(name: str, value)

Raises a ValueError if a given value is None.

Parameters:
  • name – The name of the parameter, the value corresponds to

  • value – The value