Algebra#
Extrapolation#
colour
|
Extrapolate 1-D function values beyond the specified interpolator's domain boundaries. |
Interpolation#
colour
|
Perform kernel-based interpolation of a 1-D function. |
|
Perform linear interpolation of a 1-D function. |
|
Perform nearest-neighbour interpolation on discrete data. |
|
Implement 1-D function null interpolation. |
|
Interpolate a 1-D function using Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) interpolation. |
|
Perform fifth-order polynomial interpolation using the Sprague (1880) method for uniformly spaced data. |
|
Compute Lagrange coefficients at specified point \(r\) for polynomial interpolation of degree \(n\). |
|
Perform interpolation of the specified \(V_{xyz}\) values using a 4-dimensional interpolation table. |
Supported table interpolation methods. |
Interpolation Kernels
colour
|
Return the cardinal spline kernel evaluated at specified samples. |
|
Return the Lanczos kernel evaluated at specified samples. |
Evaluate the linear kernel at specified samples. |
|
Return the nearest-neighbour kernel evaluated at specified samples. |
|
|
Evaluate the sinc kernel at specified sample positions. |
Ancillary Objects
colour.algebra
|
Perform tetrahedral interpolation of the specified \(V_{xyz}\) values using the specified 4-dimensional interpolation table. |
|
Perform trilinear interpolation of the specified \(V_{xyz}\) values using the specified interpolation table. |
Coordinates#
colour.algebra
Transform specified cartesian coordinates array \(xyz\) to cylindrical coordinates array \(\rho\phi z\) (radial distance, azimuth and height). |
|
Transform specified cartesian coordinates array \(xy\) to polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate). |
|
Transform specified cartesian coordinates array \(xyz\) to spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth). |
|
Transform specified cylindrical coordinates array \(\rho\phi z\) (radial distance, azimuth and height) to cartesian coordinates array \(xyz\). |
|
Transform specified polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate) to Cartesian coordinates array \(xy\). |
|
Transform specified spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth) to cartesian coordinates array \(xyz\). |
Random#
colour.algebra
|
Generate random triplets using a pseudo-random number generator. |
Regression#
colour.algebra
Compute the least-squares mapping from dependent variable \(y\) to independent variable \(x\) using Moore-Penrose inverse. |
Common#
colour.algebra
|
Compute the eigenvalues \(w\) and eigenvectors \(v\) of the specified array \(a\) in the specified order. |
|
Calculate the Euclidean distance between the specified point arrays \(a\) and \(b\). |
Return the current Colour safe division mode. |
|
|
Determine whether the specified array \(a\) is an identity matrix. |
Return whether Colour safe / symmetrical power function is enabled. |
|
|
Perform linear interpolation between specified arrays \(a\) and \(b\) using array \(x\). |
|
Perform simple linear conversion of the specified array \(a\) between the old and new ranges. |
|
Perform linear interpolation between specified arrays \(a\) and \(b\) using array \(x\). |
|
Compute the Manhattan (or City-Block) distance between point array \(a\) and point array \(b\). |
|
Normalise specified array \(a\) values by \(a\) maximum value and optionally clip them between [0, factor]. |
Normalise the specified vector \(a\). |
|
|
Perform safe division of array \(a\) by array \(b\) while handling zero-division cases. |
|
Context manager and decorator for temporarily modifying Colour safe division function mode. |
|
Set the Colour safe division function mode. |
|
Set the Colour safe/symmetrical power function enabled state. |
|
Apply the smoothstep cubic Hermite interpolation function to array \(x\). |
|
Apply the smoothstep cubic Hermite interpolation function to array \(x\). |
|
Raise specified array \(a\) to the power \(p\) as follows: \(\text{sign}(a) \cdot |a|^p\). |
|
Context manager and decorator for temporarily setting the state of Colour safe/symmetrical power function. |
|
Perform batched multiplication between the matrix array \(m\) and vector array \(v\). |