check_type

sknano.core.check_type(obj, allowed_types=())[source] [edit on github][source]

Check object type against tuple of allowed_types.

Parameters:
  • obj (object) –
  • allowed_types (tuple) – tuple of allowed classes and/or types
Raises:

TypeError – If value fails isinstance check against allowed_types.