Utilities¶
Common¶
colour
|
A context manager and decorator temporarily setting Colour domain-range scale. |
Returns the current Colour domain-range scale. |
|
|
Sets the current Colour domain-range scale. |
colour.utilities
|
Decorator for handling Numpy errors. |
|
Wrapper for given function. |
|
Wrapper for given function. |
|
Wrapper for given function. |
|
Wrapper for given function. |
|
Decorator for ignoring Python warnings. |
|
Returns a batch generator from given iterable. |
A context manager and decorator temporarily disabling Colour multiprocessing. |
|
|
A context manager providing a multiprocessing pool. |
|
Returns if Matplotlib is installed and available. |
|
Returns if NetworkX is installed and available. |
|
Returns if OpenImageIO is installed and available. |
|
Returns if Pandas is installed and available. |
|
Returns if tqdm is installed and available. |
|
A decorator checking if various requirements are satisfied. |
|
Returns if given \(a\) variable is iterable. |
|
Returns if given \(a\) variable is a string like variable. |
|
Returns if given \(a\) variable is a number. |
|
Returns if given \(a\) variable is an integer under given threshold. |
|
Returns whether given element type is present in given mapping types. |
|
Filters keyword arguments incompatible with the given function signature. |
|
Filters given mapping with given filterers. |
|
Return the first item of an iterable. |
|
Scales given array \(a\) to domain ‘1’. |
|
Scales given array \(a\) to domain ‘10’, used by Munsell Renotation System. |
|
Scales given array \(a\) to domain ‘100’. |
|
Scales given array \(a\) to degrees domain. |
|
Scales given array \(a\) to int domain. |
|
Scales given array \(a\) from range ‘1’. |
|
Scales given array \(a\) from range ‘10’, used by Munsell Renotation System. |
|
Scales given array \(a\) from range ‘100’. |
|
Scales given array \(a\) from degrees range. |
|
Scales given array \(a\) from int range. |
|
Copies a definition with same code, globals, defaults, closure, and name. |
|
Validates whether given method exists in the given valid methods and returns the method lower cased. |
Array¶
colour.utilities
|
Converts given \(a\) variable to ndarray using given type. |
|
Converts given \(a\) variable to ndarray using given type. |
|
Converts given \(a\) variable to ndarray using given type. |
|
Converts given \(a\) variable to numeric. |
|
Attempts to converts given \(a\) variable to int using given type. |
|
Converts given \(a\) variable to numeric using given type. |
|
Sets Colour float precision by setting |
|
Sets Colour integer precision by setting |
|
Converts given \(a\) variable to given namedtuple class instance. |
|
Returns the \(a\) variable closest element indexes to reference \(b\) variable elements. |
|
Returns the \(a\) variable closest elements to reference \(b\) variable elements. |
|
Returns the interval size of given distribution. |
|
Returns if given distribution is uniform. |
|
Tests whether each element of an array is also present in a second array within given tolerance. |
|
Stacks arrays in sequence along the last axis (tail). |
|
Splits arrays in sequence along the last axis (tail). |
Returns the per row diagonal matrices of the given array. |
|
|
Orient given array according to given |
|
Computes the centroid indexes of given \(a\) array. |
|
Fills given array NaNs according to given method. |
A context manager setting given array writeable to perform an operation and then read-only. |
|
|
Simple wrapper around |
|
Simple wrapper around |
|
Simple wrapper around |
Metrics¶
colour.utilities
|
Computes the mean squared error (MSE) or mean squared deviation (MSD) between given array_like \(a\) and \(b\) variables. |
|
Computes the peak signal-to-noise ratio (PSNR) between given array_like \(a\) and \(b\) variables. |
Data Structures¶
colour.utilities
|
Implements a case-insensitive mutable mapping / dict object. |
|
Implements a lazy case-insensitive mutable mapping / dict object by inheriting from |
Extends dict type to provide a lookup by value(s). |
|
|
Defines a dict-like object allowing to access key values using dot syntax. |
Verbose¶
colour.utilities
|
Prints a message inside a box. |
|
Issues a warning. |
|
Filters Colour and also optionally overall Python warnings. |
|
A context manager filtering Colour and also optionally overall Python warnings. |
|
A context manager implementing context changes to Numpy print behaviour. |
|
Describes Colour running environment, i.e. interpreter, runtime and development packages. |
Ancillary Objects
colour.utilities
This is the base class of Colour warnings. |
|
This is the base class of Colour usage warnings. |
|
This is the base class of Colour runtime warnings. |