colour.utilities.handle_numpy_errors#

colour.utilities.handle_numpy_errors(**kwargs: Any) Callable[source]#

Decorate a function to handle Numpy errors.

Parameters

kwargs (Any) – Keywords arguments.

Return type

Callable

References

[KPK11]

Examples

>>> import numpy
>>> @handle_numpy_errors(all='ignore')
... def f():
...     1 / numpy.zeros(3)
>>> f()