colour.algebra.sdiv_mode#

class colour.algebra.sdiv_mode(mode: Optional[Literal['Numpy', 'Ignore', 'Warning', 'Raise', 'Ignore Zero Conversion', 'Warning Zero Conversion', 'Ignore Limit Conversion', 'Warning Limit Conversion']] = None)[source]#

Define a context manager and decorator temporarily setting Colour safe division function mode.

Parameters

mode (Literal['Numpy', 'Ignore', 'Warning', 'Raise', 'Ignore Zero Conversion', 'Warning Zero Conversion', 'Ignore Limit Conversion', 'Warning Limit Conversion'] | None) – Colour safe division function mode, see colour.algebra.sdiv() definition for an explanation about the possible modes.

Return type

None

__init__(mode: Optional[Literal['Numpy', 'Ignore', 'Warning', 'Raise', 'Ignore Zero Conversion', 'Warning Zero Conversion', 'Ignore Limit Conversion', 'Warning Limit Conversion']] = None) None[source]#
Parameters

mode (Optional[Literal['Numpy', 'Ignore', 'Warning', 'Raise', 'Ignore Zero Conversion', 'Warning Zero Conversion', 'Ignore Limit Conversion', 'Warning Limit Conversion']]) –

Return type

None

Methods

__init__([mode])