colour.utilities.is_array_api_enabled#
- colour.utilities.is_array_api_enabled() bool[source]#
Determine whether Colour Array API dispatch is enabled.
The Array API dispatch state is controlled by the global COLOUR_SCIENCE__ARRAY_API environment variable and can be temporarily modified using the
set_array_api_enabled()function or thearray_api_enablecontext manager.- Returns:
Whether Colour Array API dispatch is enabled.
- Return type:
Examples
>>> with array_api_enable(False): ... is_array_api_enabled() False >>> with array_api_enable(True): ... is_array_api_enabled() True