spiketools.utils.checks.check_param_type¶
- spiketools.utils.checks.check_param_type(param, label, types)[source]¶
Check that a parameter has an acceptable type.
- Parameters:
- paramobject
Parameter to check type of.
- labelstr
Label of the parameter being checked.
- typestype or tuple of type
Type(s) to check the given parameter is one of.
- Raises:
- ValueError
If the parameter is not one of the specified acceptable types.
Notes
If checking elements in an array, then proper checking should include relevant numpy types.