colour.utilities.ndarray_copy_enable#
- class colour.utilities.ndarray_copy_enable(enable: bool)[source]#
Bases:
objectDefine a context manager and decorator to temporarily set the Colour
numpy.ndarraycopy enabled state.- Parameters:
enable (bool) – Whether to enable or disable Colour
numpy.ndarraycopy.
- __enter__() Self[source]#
Set the Colour
numpy.ndarraycopy enabled state upon entering the context manager.- Return type:
- __exit__(*args: Any) None[source]#
Restore the Colour
numpy.ndarraycopy enabled state upon exiting the context manager.- Parameters:
args (Any)
- Return type:
None
- __call__(function: Callable) Callable[source]#
Decorate and call the specified function with array copy control.
- Parameters:
function (Callable) – Function to be decorated with array copy state management.
- Returns:
Decorated function that executes within the configured array copy state context.
- Return type:
Callable
- __weakref__#
list of weak references to the object