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 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. |
Array¶
colour.utilities
|
Converts given \(a\) variable to ndarray with given type. |
|
Converts given \(a\) variable to ndarray using the type defined by |
Converts given \(a\) variable to ndarray using the type defined by |
|
|
Converts given \(a\) variable to numeric. |
|
Converts given \(a\) variable to numeric using the type defined by |
|
Converts given \(a\) variable to numeric using the type defined by |
|
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. |
|
Normalises given array_like \(a\) variable values by \(a\) variable maximum value and optionally clip them between. |
|
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. |
|
|
Convenient wrapper around |
|
Convenient wrapper around |
|
Orient given array according to given |
|
Computes the centroid indexes of given \(a\) array. |
|
Performs a simple linear conversion of given array between the old and new ranges. |
|
Performs a simple linear interpolation between given array \(a\) and array \(b\) using \(c\) value. |
|
Fills given array NaNs according to given method. |
A context manager setting given array writeable to perform an operation and then read-only. |
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. |
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. |
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. |