yawning_titan.envs.generic.helpers.environment_input_validation.check_within_range#
- yawning_titan.envs.generic.helpers.environment_input_validation.check_within_range(data, name, lower, upper, l_inclusive, u_inclusive)[source]#
Check that an item belonging to a dictionary fits within a certain numerical range (either inclusive or not).
If upper or lower are None then ignores that direction.
- Parameters:
data – The dictionary where the item is held
name – The name of the key that corresponds to the item
lower – The lower bound for the range (None means no lower bound)
upper – The upper bound for the range (None means no upper bound)
l_inclusive – Boolean - True for inclusive, False for not
u_inclusive – Boolean - True for inclusive, False for not