colour.utilities.handle_numpy_errors

colour.utilities.handle_numpy_errors(**kwargs)[source]

Decorator for handling Numpy errors.

Other Parameters:
 **kwargs (dict, optional) – Keywords arguments.
Returns:
Return type:object

References

[Kienzle2011a]

Examples

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