spiketools.utils.checks.check_param_options¶
- spiketools.utils.checks.check_param_options(param, label, options, ignore_case=False)[source]¶
Check a parameter value is one of the acceptable options.
- Parameters:
- paramstr
Parameter value to check.
- labelstr
Label of the parameter being checked.
- optionslist of str
Valid string values that param may be.
- ignore_casebool, optional, default: False
If True, ignore whether strings are upper or lower case for comparison.
- Raises:
- ValueError
If a parameter that is being checked is not in options.