check_type#
- skactiveml.utils.check_type(obj, name, *target_types, target_vals=None, indicator_funcs=None)[source]#
Check whether an object satisfies type, value, or indicator rules.
- Parameters:
- objobject
The object to be checked.
- namestr
The variable name of the object.
- target_typesiterable
The possible types.
- target_valsiterable, default=None
Possible further values that the object is allowed to equal.
- indicator_funcsiterable, default=None
Possible further custom indicator (boolean) functions that accept the object by returning True if the object is passed as a parameter.
- Raises:
- TypeError
If obj does not match any allowed type or value and is not accepted by any indicator function.