Typecheck
#
- pymeasurement.util.typecheck.typecheck(check, *args)[source]#
Check if the type of check is in args.
- Parameters:
check (object) – The object to check the type of.
args (Iterable<type>) – The types to check against.
- Raises:
TypeError – If the type of check is not in args.
- pymeasurement.util.typecheck.typecheckArray(checkArray, *args, dimension=1)[source]#
Check if the type of each object in checkArray is in args.
- Parameters:
checkArray (Iterable<object>) – The array of objects to check the type of.
args (Iterable<type>) – The types to check against.
dimension (int) – The dimension of the array to check.
- Raises:
TypeError – If the type of any object in checkArray is not in args.