colour.algebra.set_sdiv_mode#

colour.algebra.set_sdiv_mode(mode: Literal['Numpy', 'Ignore', 'Warning', 'Raise', 'Ignore Zero Conversion', 'Warning Zero Conversion', 'Ignore Limit Conversion', 'Warning Limit Conversion', 'Replace With Epsilon', 'Warning Replace With Epsilon'] | str) None[source]#

Set the Colour safe division function mode.

Parameters:

mode (Literal['Numpy', 'Ignore', 'Warning', 'Raise', 'Ignore Zero Conversion', 'Warning Zero Conversion', 'Ignore Limit Conversion', 'Warning Limit Conversion', 'Replace With Epsilon', 'Warning Replace With Epsilon'] | str) – Colour safe division mode. See colour.algebra.sdiv() definition for an explanation of the possible modes.

Return type:

None

Examples

>>> with sdiv_mode(get_sdiv_mode()):
...     print(get_sdiv_mode())
...     set_sdiv_mode("Raise")
...     print(get_sdiv_mode())
ignore zero conversion
raise