colour.utilities.common Module

Common Utilities

Defines common utilities objects that don”t fall in any specific category.

colour.utilities.common.is_scipy_installed(raise_exception=False)[source]

Returns if scipy is installed and available.

Parameters:raise_exception (bool) – Raise exception if scipy is unavailable.
Returns:Is scipy installed.
Return type:bool
Raises:ImportError – If scipy is not installed.
colour.utilities.common.is_string(data)[source]

Returns if given data is a string_like variable

Parameters:data (object) – Data to test.
Returns:Is string_like variable.
Return type:bool

Examples

>>> is_string('I`m a string!')
True
>>> is_string(['I`m a string!'])
False