colour.utilities.handle_numpy_errors#
- colour.utilities.handle_numpy_errors(**kwargs: Any) Callable[source]#
Handle Numpy errors through function decoration.
- Parameters:
kwargs (Any) – Keyword arguments passed to
numpy.seterr()to control error handling behaviour.- Returns:
Decorated function with specified Numpy error handling.
- Return type:
References
[KPK11]
Examples
>>> import numpy >>> @handle_numpy_errors(all="ignore") ... def f(): ... 1 / numpy.zeros(3) >>> f()