code stringlengths 66 870k | docstring stringlengths 19 26.7k | func_name stringlengths 1 138 | language stringclasses 1
value | repo stringlengths 7 68 | path stringlengths 5 324 | url stringlengths 46 389 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
def LMS_to_Yrg(LMS: ArrayLike) -> NDArrayFloat:
"""
Convert from *LMS* colourspace to *Kirk (2019)* *Yrg* colourspace.
Parameters
----------
LMS
*LMS* colourspace values.
Returns
-------
:class:`numpy.ndarray`
*Kirk (2019)* *Yrg* :math:`Yrg` luminance, redness, and gree... |
Convert from *LMS* colourspace to *Kirk (2019)* *Yrg* colourspace.
Parameters
----------
LMS
*LMS* colourspace values.
Returns
-------
:class:`numpy.ndarray`
*Kirk (2019)* *Yrg* :math:`Yrg` luminance, redness, and greenness.
Notes
-----
+------------+---------... | LMS_to_Yrg | python | colour-science/colour | colour/models/yrg.py | https://github.com/colour-science/colour/blob/master/colour/models/yrg.py | BSD-3-Clause |
def Yrg_to_LMS(Yrg: ArrayLike) -> NDArrayFloat:
"""
Convert from *Kirk (2019)* *Yrg* colourspace to *LMS* colourspace.
Parameters
----------
Yrg
*Kirk (2019)* *Yrg* :math:`Yrg` luminance, redness, and greenness.
Returns
-------
:class:`numpy.ndarray`
*LMS* colourspace v... |
Convert from *Kirk (2019)* *Yrg* colourspace to *LMS* colourspace.
Parameters
----------
Yrg
*Kirk (2019)* *Yrg* :math:`Yrg` luminance, redness, and greenness.
Returns
-------
:class:`numpy.ndarray`
*LMS* colourspace values.
Notes
-----
+------------+---------... | Yrg_to_LMS | python | colour-science/colour | colour/models/yrg.py | https://github.com/colour-science/colour/blob/master/colour/models/yrg.py | BSD-3-Clause |
def CMY_to_CMYK(CMY: ArrayLike) -> NDArrayFloat:
"""
Convert from *CMY* colourspace to *CMYK* colourspace.
Parameters
----------
CMY
*CMY* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*CMYK* array.
Notes
-----
+------------+--------------------... |
Convert from *CMY* colourspace to *CMYK* colourspace.
Parameters
----------
CMY
*CMY* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*CMYK* array.
Notes
-----
+------------+-----------------------+---------------+
| **Domain** | **Scale - Refere... | CMY_to_CMYK | python | colour-science/colour | colour/models/rgb/cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/cmyk.py | BSD-3-Clause |
def CMYK_to_CMY(CMYK: ArrayLike) -> NDArrayFloat:
"""
Convert from *CMYK* colourspace to *CMY* colourspace.
Parameters
----------
CMYK
*CMYK* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*CMY* array.
Notes
-----
+------------+------------------... |
Convert from *CMYK* colourspace to *CMY* colourspace.
Parameters
----------
CMYK
*CMYK* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*CMY* array.
Notes
-----
+------------+-----------------------+---------------+
| **Domain** | **Scale - Refer... | CMYK_to_CMY | python | colour-science/colour | colour/models/rgb/cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/cmyk.py | BSD-3-Clause |
def XYZ_to_sRGB(
XYZ: ArrayLike,
illuminant: ArrayLike = CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"][
"D65"
],
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str | None
) = "CAT02",
apply_cctf_encoding: bool = True,
) -> NDArrayFloat:
"""
... |
Convert from *CIE XYZ* tristimulus values to *sRGB* colourspace.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values.
illuminant
Source illuminant chromaticity coordinates.
chromatic_adaptation_transform
*Chromatic adaptation* transform.
apply_cctf_encoding
... | XYZ_to_sRGB | python | colour-science/colour | colour/models/rgb/common.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/common.py | BSD-3-Clause |
def sRGB_to_XYZ(
RGB: ArrayLike,
illuminant: ArrayLike = CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"][
"D65"
],
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str | None
) = "CAT02",
apply_cctf_decoding: bool = True,
) -> NDArrayFloat:
"""
... |
Convert from *sRGB* colourspace to *CIE XYZ* tristimulus values.
Parameters
----------
RGB
*sRGB* colourspace array.
illuminant
Source illuminant chromaticity coordinates.
chromatic_adaptation_transform
*Chromatic adaptation* transform.
apply_cctf_decoding
W... | sRGB_to_XYZ | python | colour-science/colour | colour/models/rgb/common.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/common.py | BSD-3-Clause |
def H_to_RGB(vi: NDArrayFloat, vj: NDArrayFloat, vH: NDArrayFloat) -> NDArrayFloat:
"""Convert *hue* value to *RGB* colourspace."""
vH = as_float_array(vH)
vH[np.asarray(vH < 0)] += 1
vH[np.asarray(vH > 1)] -= 1
v = np.where(
6 * vH < 1,
vi + (vj - vi) ... | Convert *hue* value to *RGB* colourspace. | H_to_RGB | python | colour-science/colour | colour/models/rgb/cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/cylindrical.py | BSD-3-Clause |
def RGB_to_HCL(RGB: ArrayLike, gamma: float = 3, Y_0: float = 100) -> NDArrayFloat:
"""
Convert from *RGB* colourspace to *HCL* colourspace according to
*Sarifuddin and Missaoui (2005)* method.
Parameters
----------
RGB
*RGB* colourspace array.
gamma
Non-linear lightness exp... |
Convert from *RGB* colourspace to *HCL* colourspace according to
*Sarifuddin and Missaoui (2005)* method.
Parameters
----------
RGB
*RGB* colourspace array.
gamma
Non-linear lightness exponent matching *Lightness* :math:`L^*`.
Y_0
White reference luminance :math:`Y_... | RGB_to_HCL | python | colour-science/colour | colour/models/rgb/cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/cylindrical.py | BSD-3-Clause |
def HCL_to_RGB(HCL: ArrayLike, gamma: float = 3, Y_0: float = 100) -> NDArrayFloat:
"""
Convert from *HCL* colourspace to *RGB* colourspace according to
*Sarifuddin and Missaoui (2005)* method.
Parameters
----------
HCL
*HCL* colourspace array.
gamma
Non-linear lightness exp... |
Convert from *HCL* colourspace to *RGB* colourspace according to
*Sarifuddin and Missaoui (2005)* method.
Parameters
----------
HCL
*HCL* colourspace array.
gamma
Non-linear lightness exponent matching *Lightness* :math:`L^*`.
Y_0
White reference luminance :math:`Y_... | HCL_to_RGB | python | colour-science/colour | colour/models/rgb/cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/cylindrical.py | BSD-3-Clause |
def xy_to_z(xy: ArrayLike) -> float:
"""
Return the *z* coordinate using specified :math:`xy` chromaticity coordinates.
Parameters
----------
xy
:math:`xy` chromaticity coordinates.
Returns
-------
:class:`float`
*z* coordinate.
Examples
--------
>>> xy_to_... |
Return the *z* coordinate using specified :math:`xy` chromaticity coordinates.
Parameters
----------
xy
:math:`xy` chromaticity coordinates.
Returns
-------
:class:`float`
*z* coordinate.
Examples
--------
>>> xy_to_z(np.array([0.25, 0.25]))
0.5
| xy_to_z | python | colour-science/colour | colour/models/rgb/derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/derivation.py | BSD-3-Clause |
def normalised_primary_matrix(
primaries: ArrayLike, whitepoint: ArrayLike
) -> NDArrayFloat:
"""
Compute the *Normalised Primary Matrix* (NPM) converting a *RGB*
colourspace array to *CIE XYZ* tristimulus values using specified *primaries*
and *whitepoint* :math:`xy` chromaticity coordinates.
... |
Compute the *Normalised Primary Matrix* (NPM) converting a *RGB*
colourspace array to *CIE XYZ* tristimulus values using specified *primaries*
and *whitepoint* :math:`xy` chromaticity coordinates.
Parameters
----------
primaries
Primaries :math:`xy` chromaticity coordinates.
whitep... | normalised_primary_matrix | python | colour-science/colour | colour/models/rgb/derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/derivation.py | BSD-3-Clause |
def chromatically_adapted_primaries(
primaries: ArrayLike,
whitepoint_t: ArrayLike,
whitepoint_r: ArrayLike,
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str
) = "CAT02",
) -> NDArrayFloat:
"""
Chromatically adapt specified *primaries* :math:`xy` chromatici... |
Chromatically adapt specified *primaries* :math:`xy` chromaticity coordinates
from test ``whitepoint_t`` to reference ``whitepoint_r``.
Parameters
----------
primaries
Primaries :math:`xy` chromaticity coordinates.
whitepoint_t
Test illuminant / whitepoint :math:`xy` chromatici... | chromatically_adapted_primaries | python | colour-science/colour | colour/models/rgb/derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/derivation.py | BSD-3-Clause |
def primaries_whitepoint(npm: ArrayLike) -> Tuple[NDArrayFloat, NDArrayFloat]:
"""
Compute the *primaries* and *whitepoint* :math:`xy` chromaticity
coordinates using specified *Normalised Primary Matrix* (NPM).
Parameters
----------
npm
*Normalised Primary Matrix*.
Returns
----... |
Compute the *primaries* and *whitepoint* :math:`xy` chromaticity
coordinates using specified *Normalised Primary Matrix* (NPM).
Parameters
----------
npm
*Normalised Primary Matrix*.
Returns
-------
:class:`tuple`
*Primaries* and *whitepoint* :math:`xy` chromaticity co... | primaries_whitepoint | python | colour-science/colour | colour/models/rgb/derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/derivation.py | BSD-3-Clause |
def RGB_luminance_equation(primaries: ArrayLike, whitepoint: ArrayLike) -> str:
"""
Return the *luminance equation* from specified *primaries* and *whitepoint*.
Parameters
----------
primaries
Primaries chromaticity coordinates.
whitepoint
Illuminant / whitepoint chromaticity co... |
Return the *luminance equation* from specified *primaries* and *whitepoint*.
Parameters
----------
primaries
Primaries chromaticity coordinates.
whitepoint
Illuminant / whitepoint chromaticity coordinates.
Returns
-------
:class:`str`
*Luminance* equation.
... | RGB_luminance_equation | python | colour-science/colour | colour/models/rgb/derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/derivation.py | BSD-3-Clause |
def RGB_luminance(
RGB: ArrayLike, primaries: ArrayLike, whitepoint: ArrayLike
) -> NDArrayFloat:
"""
Return the *luminance* :math:`Y` of specified *RGB* components from specified
*primaries* and *whitepoint*.
Parameters
----------
RGB
*RGB* chromaticity coordinate matrix.
prima... |
Return the *luminance* :math:`Y` of specified *RGB* components from specified
*primaries* and *whitepoint*.
Parameters
----------
RGB
*RGB* chromaticity coordinate matrix.
primaries
Primaries chromaticity coordinate matrix.
whitepoint
Illuminant / whitepoint chromat... | RGB_luminance | python | colour-science/colour | colour/models/rgb/derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/derivation.py | BSD-3-Clause |
def RGB_to_IHLS(RGB: ArrayLike) -> NDArrayFloat:
"""
Convert from *RGB* colourspace to *IHLS* (Improved HLS) colourspace.
Parameters
----------
RGB
*RGB* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*HYS* colourspace array.
Notes
-----
+--------... |
Convert from *RGB* colourspace to *IHLS* (Improved HLS) colourspace.
Parameters
----------
RGB
*RGB* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*HYS* colourspace array.
Notes
-----
+------------+-----------------------+---------------+
| **Do... | RGB_to_IHLS | python | colour-science/colour | colour/models/rgb/hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/hanbury2003.py | BSD-3-Clause |
def IHLS_to_RGB(HYS: ArrayLike) -> NDArrayFloat:
"""
Convert from *IHLS* (Improved HLS) colourspace to *RGB* colourspace.
Parameters
----------
HYS
*IHLS* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*RGB* colourspace array.
Notes
-----
+------... |
Convert from *IHLS* (Improved HLS) colourspace to *RGB* colourspace.
Parameters
----------
HYS
*IHLS* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*RGB* colourspace array.
Notes
-----
+------------+-----------------------+---------------+
| **... | IHLS_to_RGB | python | colour-science/colour | colour/models/rgb/hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/hanbury2003.py | BSD-3-Clause |
def RGB_to_ICtCp(
RGB: ArrayLike,
method: (
Literal[
"Dolby 2016",
"ITU-R BT.2100-1 HLG",
"ITU-R BT.2100-1 PQ",
"ITU-R BT.2100-2 HLG",
"ITU-R BT.2100-2 PQ",
]
| str
) = "Dolby 2016",
L_p: float = 10000,
) -> NDArrayFloat... |
Convert from *ITU-R BT.2020* colourspace to :math:`IC_TC_P` colour
encoding.
Parameters
----------
RGB
*ITU-R BT.2020* colourspace array.
method
Computation method. *Recommendation ITU-R BT.2100* defines multiple
variants of the :math:`IC_TC_P` colour encoding:
... | RGB_to_ICtCp | python | colour-science/colour | colour/models/rgb/ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ictcp.py | BSD-3-Clause |
def ICtCp_to_RGB(
ICtCp: ArrayLike,
method: (
Literal[
"Dolby 2016",
"ITU-R BT.2100-1 HLG",
"ITU-R BT.2100-1 PQ",
"ITU-R BT.2100-2 HLG",
"ITU-R BT.2100-2 PQ",
]
| str
) = "Dolby 2016",
L_p: float = 10000,
) -> NDArrayFlo... |
Convert from :math:`IC_TC_P` colour encoding to *ITU-R BT.2020*
colourspace.
Parameters
----------
ICtCp
:math:`IC_TC_P` colour encoding array.
method
Computation method. *Recommendation ITU-R BT.2100* defines multiple
variants of the :math:`IC_TC_P` colour encoding:
... | ICtCp_to_RGB | python | colour-science/colour | colour/models/rgb/ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ictcp.py | BSD-3-Clause |
def XYZ_to_ICtCp(
XYZ: ArrayLike,
illuminant: ArrayLike = CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"][
"D65"
],
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str | None
) = "CAT02",
method: (
Literal[
"Dolby 2016",
... |
Convert from *CIE XYZ* tristimulus values to :math:`IC_TC_P` colour
encoding.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values.
illuminant
Source illuminant chromaticity coordinates.
chromatic_adaptation_transform
*Chromatic adaptation* transform.
method
... | XYZ_to_ICtCp | python | colour-science/colour | colour/models/rgb/ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ictcp.py | BSD-3-Clause |
def ICtCp_to_XYZ(
ICtCp: ArrayLike,
illuminant: ArrayLike = CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"][
"D65"
],
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str | None
) = "CAT02",
method: (
Literal[
"Dolby 2016",
... |
Convert from :math:`IC_TC_P` colour encoding to *CIE XYZ* tristimulus
values.
Parameters
----------
ICtCp
:math:`IC_TC_P` colour encoding array.
illuminant
Source illuminant chromaticity coordinates.
chromatic_adaptation_transform
*Chromatic adaptation* transform.
... | ICtCp_to_XYZ | python | colour-science/colour | colour/models/rgb/ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ictcp.py | BSD-3-Clause |
def _clipped_domain_function(
function: Callable, domain: list | tuple = (0, 1)
) -> Callable:
"""
Wrap specified function and produce a new callable clipping the input value to
specified domain.
Parameters
----------
function
Function to wrap.
domain
Domain to use for c... |
Wrap specified function and produce a new callable clipping the input value to
specified domain.
Parameters
----------
function
Function to wrap.
domain
Domain to use for clipping.
Examples
--------
>>> linear_clipped = _clipped_domain_function(linear_function, (0.... | _clipped_domain_function | python | colour-science/colour | colour/models/rgb/itut_h_273.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/itut_h_273.py | BSD-3-Clause |
def _unspecified(*args: Any) -> NoReturn: # noqa: ARG001
"""
Define an unspecified function.
Examples
--------
>>> try:
... _unspecified()
... except RuntimeError:
... pass
"""
error = (
"Unspecified; Image characteristics are unknown or are determined by "
... |
Define an unspecified function.
Examples
--------
>>> try:
... _unspecified()
... except RuntimeError:
... pass
| _unspecified | python | colour-science/colour | colour/models/rgb/itut_h_273.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/itut_h_273.py | BSD-3-Clause |
def describe_video_signal_colour_primaries(
code_point: int, print_description: bool = True, **kwargs: Any
) -> str:
"""
Describe specified video signal colour primaries code point.
Parameters
----------
code_point
Video signal colour primaries code point to describe from
:attr:... |
Describe specified video signal colour primaries code point.
Parameters
----------
code_point
Video signal colour primaries code point to describe from
:attr:`colour.COLOUR_PRIMARIES_ITUTH273` attribute.
print_description
Whether to print the description.
Other Paramet... | describe_video_signal_colour_primaries | python | colour-science/colour | colour/models/rgb/itut_h_273.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/itut_h_273.py | BSD-3-Clause |
def describe_video_signal_transfer_characteristics(
code_point: int, print_description: bool = True, **kwargs: Any
) -> str:
"""
Describe specified video signal transfer characteristics code point.
Parameters
----------
code_point
Video signal transfer characteristics code point to desc... |
Describe specified video signal transfer characteristics code point.
Parameters
----------
code_point
Video signal transfer characteristics code point to describe from
:attr:`colour.TRANSFER_CHARACTERISTICS_ITUTH273` attribute.
print_description
Whether to print the descrip... | describe_video_signal_transfer_characteristics | python | colour-science/colour | colour/models/rgb/itut_h_273.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/itut_h_273.py | BSD-3-Clause |
def describe_video_signal_matrix_coefficients(
code_point: int, print_description: bool = True, **kwargs: Any
) -> str:
"""
Describe specified video signal matrix coefficients code point.
Parameters
----------
code_point
Video signal matrix coefficients code point to describe from
... |
Describe specified video signal matrix coefficients code point.
Parameters
----------
code_point
Video signal matrix coefficients code point to describe from
:attr:`colour.MATRIX_COEFFICIENTS_ITUTH273` attribute.
print_description
Whether to print the description.
Othe... | describe_video_signal_matrix_coefficients | python | colour-science/colour | colour/models/rgb/itut_h_273.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/itut_h_273.py | BSD-3-Clause |
def RGB_to_Prismatic(RGB: ArrayLike) -> NDArrayFloat:
"""
Convert from *RGB* colourspace to *Prismatic* :math:`L\\rho\\gamma\\beta`
colourspace array.
Parameters
----------
RGB
*RGB* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*Prismatic* :math:`L\\rho... |
Convert from *RGB* colourspace to *Prismatic* :math:`L\rho\gamma\beta`
colourspace array.
Parameters
----------
RGB
*RGB* colourspace array.
Returns
-------
:class:`numpy.ndarray`
*Prismatic* :math:`L\rho\gamma\beta` colourspace array.
Notes
-----
+-------... | RGB_to_Prismatic | python | colour-science/colour | colour/models/rgb/prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/prismatic.py | BSD-3-Clause |
def Prismatic_to_RGB(Lrgb: ArrayLike) -> NDArrayFloat:
"""
Convert from *Prismatic* :math:`L\\rho\\gamma\\beta` colourspace array to
*RGB* colourspace.
Parameters
----------
Lrgb
*Prismatic* :math:`L\\rho\\gamma\\beta` colourspace array.
Returns
-------
:class:`numpy.ndarra... |
Convert from *Prismatic* :math:`L\rho\gamma\beta` colourspace array to
*RGB* colourspace.
Parameters
----------
Lrgb
*Prismatic* :math:`L\rho\gamma\beta` colourspace array.
Returns
-------
:class:`numpy.ndarray`
*RGB* colourspace array.
Notes
-----
+------... | Prismatic_to_RGB | python | colour-science/colour | colour/models/rgb/prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/prismatic.py | BSD-3-Clause |
def primaries(self, value: ArrayLike) -> None:
"""Setter for the **self.primaries** property."""
attest(
isinstance(value, (tuple, list, np.ndarray, np.matrix)),
f'"matrix_XYZ_to_RGB" property: "{value!r}" is not a "tuple", '
f'"list", "ndarray" or "matrix" instance!... | Setter for the **self.primaries** property. | primaries | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def whitepoint(self, value: ArrayLike) -> None:
"""Setter for the **self.whitepoint** property."""
attest(
isinstance(value, (tuple, list, np.ndarray, np.matrix)),
f'"matrix_XYZ_to_RGB" property: "{value!r}" is not a "tuple", '
f'"list", "ndarray" or "matrix" instanc... | Setter for the **self.whitepoint** property. | whitepoint | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def matrix_RGB_to_XYZ(self) -> NDArrayFloat:
"""
Getter and setter property for the transformation matrix from
colourspace to *CIE XYZ* tristimulus values.
Parameters
----------
value
Transformation matrix from colourspace to *CIE XYZ* tristimulus
... |
Getter and setter property for the transformation matrix from
colourspace to *CIE XYZ* tristimulus values.
Parameters
----------
value
Transformation matrix from colourspace to *CIE XYZ* tristimulus
values.
Returns
-------
:class... | matrix_RGB_to_XYZ | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def matrix_XYZ_to_RGB(self) -> NDArrayFloat:
"""
Getter and setter property for the transformation matrix from *CIE XYZ*
tristimulus values to colourspace.
Parameters
----------
value
Transformation matrix from *CIE XYZ* tristimulus values to
colo... |
Getter and setter property for the transformation matrix from *CIE XYZ*
tristimulus values to colourspace.
Parameters
----------
value
Transformation matrix from *CIE XYZ* tristimulus values to
colourspace.
Returns
-------
:class... | matrix_XYZ_to_RGB | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def __str__(self) -> str:
"""
Return a formatted string representation of the *RGB* colourspace.
Returns
-------
:class:`str`
Formatted string representation.
Examples
--------
>>> p = np.array(
... [0.73470, 0.26530, 0.00000, 1.0... |
Return a formatted string representation of the *RGB* colourspace.
Returns
-------
:class:`str`
Formatted string representation.
Examples
--------
>>> p = np.array(
... [0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700]
... ... | __str__ | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def __repr__(self) -> str:
"""
Return an (almost) evaluable string representation of the *RGB*
colourspace.
Returns
-------
:class`str`
(Almost) evaluable string representation.
Examples
--------
>>> from colour.models import linear_f... |
Return an (almost) evaluable string representation of the *RGB*
colourspace.
Returns
-------
:class`str`
(Almost) evaluable string representation.
Examples
--------
>>> from colour.models import linear_function
>>> p = np.array([0.73... | __repr__ | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def _derive_transformation_matrices(self) -> None:
"""
Compute the derived transformations matrices, the normalised primary
matrix and its inverse.
"""
if self._primaries is not None and self._whitepoint is not None:
npm = normalised_primary_matrix(self._primaries, s... |
Compute the derived transformations matrices, the normalised primary
matrix and its inverse.
| _derive_transformation_matrices | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def use_derived_transformation_matrices(self, usage: bool = True) -> None:
"""
Enable or disables usage of both derived transformations matrices,
the normalised primary matrix and its inverse in subsequent
computations.
Parameters
----------
usage
Whe... |
Enable or disables usage of both derived transformations matrices,
the normalised primary matrix and its inverse in subsequent
computations.
Parameters
----------
usage
Whether to use the derived transformations matrices.
| use_derived_transformation_matrices | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def chromatically_adapt(
self,
whitepoint: ArrayLike,
whitepoint_name: str | None = None,
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str
) = "CAT02",
) -> RGB_Colourspace:
"""
Chromatically adapt the *RGB* colourspace *... |
Chromatically adapt the *RGB* colourspace *primaries* :math:`xy`
chromaticity coordinates from *RGB* colourspace whitepoint to reference
``whitepoint``.
Parameters
----------
whitepoint
Reference illuminant / whitepoint :math:`xy` chromaticity
co... | chromatically_adapt | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def XYZ_to_RGB(
XYZ: ArrayLike,
colourspace: RGB_Colourspace | LiteralRGBColourspace | str,
illuminant: ArrayLike | None = None,
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str | None
) = "CAT02",
apply_cctf_encoding: bool = False,
*args: Any,
**kwargs... |
Convert from *CIE XYZ* tristimulus values to *RGB* colourspace array.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values.
colourspace
Output *RGB* colourspace.
illuminant
*CIE xy* chromaticity coordinates or *CIE xyY* colourspace array of the
*illuminant* fo... | XYZ_to_RGB | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def RGB_to_XYZ(
RGB: ArrayLike,
colourspace: RGB_Colourspace | LiteralRGBColourspace | str,
illuminant: ArrayLike | None = None,
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str | None
) = "CAT02",
apply_cctf_decoding: bool = False,
*args: Any,
**kwargs... |
Convert specified *RGB* colourspace array to *CIE XYZ* tristimulus values.
Parameters
----------
RGB
*RGB* colourspace array.
colourspace
Input *RGB* colourspace.
illuminant
*CIE xy* chromaticity coordinates or *CIE xyY* colourspace array of the
*illuminant* for... | RGB_to_XYZ | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def matrix_RGB_to_RGB(
input_colourspace: RGB_Colourspace | LiteralRGBColourspace | str,
output_colourspace: RGB_Colourspace | LiteralRGBColourspace | str,
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str | None
) = "CAT02",
) -> NDArrayFloat:
"""
Compute the m... |
Compute the matrix :math:`M` converting from specified input *RGB*
colourspace to output *RGB* colourspace using specified *chromatic
adaptation* method.
Parameters
----------
input_colourspace
*RGB* input colourspace.
output_colourspace
*RGB* output colourspace.
chroma... | matrix_RGB_to_RGB | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def RGB_to_RGB(
RGB: ArrayLike,
input_colourspace: RGB_Colourspace | LiteralRGBColourspace | str,
output_colourspace: RGB_Colourspace | LiteralRGBColourspace | str,
chromatic_adaptation_transform: (
LiteralChromaticAdaptationTransform | str | None
) = "CAT02",
apply_cctf_decoding: bool =... |
Convert specified *RGB* colourspace array from specified input *RGB* colourspace
to output *RGB* colourspace using specified *chromatic adaptation* method.
Parameters
----------
RGB
*RGB* colourspace array.
input_colourspace
*RGB* input colourspace.
output_colourspace
... | RGB_to_RGB | python | colour-science/colour | colour/models/rgb/rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/rgb_colourspace.py | BSD-3-Clause |
def ranges_YCbCr(bits: int, is_legal: bool, is_int: bool) -> NDArrayFloat:
"""
Return the *Y'CbCr* colour encoding ranges array for specified bit-depth,
range legality and representation.
Parameters
----------
bits
Bit-depth of the *Y'CbCr* colour encoding ranges array.
is_legal
... |
Return the *Y'CbCr* colour encoding ranges array for specified bit-depth,
range legality and representation.
Parameters
----------
bits
Bit-depth of the *Y'CbCr* colour encoding ranges array.
is_legal
Whether the *Y'CbCr* colour encoding ranges array is legal.
is_int
... | ranges_YCbCr | python | colour-science/colour | colour/models/rgb/ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ycbcr.py | BSD-3-Clause |
def matrix_YCbCr(
K: NDArrayFloat = WEIGHTS_YCBCR["ITU-R BT.709"],
bits: int = 8,
is_legal: bool = False,
is_int: bool = False,
) -> NDArrayFloat:
"""
Compute the *Y'CbCr* to *R'G'B'* matrix for specified weights, bit-depth,
range legality and representation.
The related offset for the ... |
Compute the *Y'CbCr* to *R'G'B'* matrix for specified weights, bit-depth,
range legality and representation.
The related offset for the *R'G'B'* to *Y'CbCr* matrix can be computed with
the :func:`colour.offset_YCbCr` definition.
Parameters
----------
K
Luma weighting coefficients ... | matrix_YCbCr | python | colour-science/colour | colour/models/rgb/ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ycbcr.py | BSD-3-Clause |
def offset_YCbCr(
bits: int = 8, is_legal: bool = False, is_int: bool = False
) -> NDArrayFloat:
"""
Compute the *R'G'B'* to *Y'CbCr* offsets for specified bit-depth, range
legality and representation.
The related *R'G'B'* to *Y'CbCr* matrix can be computed with the
:func:`colour.matrix_YCbCr` ... |
Compute the *R'G'B'* to *Y'CbCr* offsets for specified bit-depth, range
legality and representation.
The related *R'G'B'* to *Y'CbCr* matrix can be computed with the
:func:`colour.matrix_YCbCr` definition.
Parameters
----------
bits
Bit-depth of the *Y'CbCr* colour encoding ranges... | offset_YCbCr | python | colour-science/colour | colour/models/rgb/ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ycbcr.py | BSD-3-Clause |
def RGB_to_YCbCr(
RGB: ArrayLike,
K: NDArrayFloat = WEIGHTS_YCBCR["ITU-R BT.709"],
in_bits: int = 10,
in_legal: bool = False,
in_int: bool = False,
out_bits: int = 8,
out_legal: bool = True,
out_int: bool = False,
clamp_int: bool = True,
**kwargs: Any,
) -> NDArrayReal:
"""
... |
Convert an array of *R'G'B'* values to the corresponding *Y'CbCr* colour
encoding values array.
Parameters
----------
RGB
Input *R'G'B'* array of floats or int values.
K
Luma weighting coefficients of red and blue. See
:attr:`colour.WEIGHTS_YCBCR` for presets. Default i... | RGB_to_YCbCr | python | colour-science/colour | colour/models/rgb/ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ycbcr.py | BSD-3-Clause |
def YCbCr_to_RGB(
YCbCr: ArrayLike,
K: NDArrayFloat = WEIGHTS_YCBCR["ITU-R BT.709"],
in_bits: int = 8,
in_legal: bool = True,
in_int: bool = False,
out_bits: int = 10,
out_legal: bool = False,
out_int: bool = False,
clamp_int: bool = True,
**kwargs: Any,
) -> NDArrayReal:
"""... |
Convert an array of *Y'CbCr* colour encoding values to the corresponding
*R'G'B'* values array.
Parameters
----------
YCbCr
Input *Y'CbCr* colour encoding array of int or float values.
K
Luma weighting coefficients of red and blue. See
:attr:`colour.WEIGHTS_YCBCR` for p... | YCbCr_to_RGB | python | colour-science/colour | colour/models/rgb/ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ycbcr.py | BSD-3-Clause |
def RGB_to_YcCbcCrc(
RGB: ArrayLike,
out_bits: int = 10,
out_legal: bool = True,
out_int: bool = False,
is_12_bits_system: bool = False,
**kwargs: Any,
) -> NDArrayReal:
"""
Convert an array of *RGB* linear values to the corresponding *Yc'Cbc'Crc'*
colour encoding values array.
... |
Convert an array of *RGB* linear values to the corresponding *Yc'Cbc'Crc'*
colour encoding values array.
Parameters
----------
RGB
Input *RGB* array of linear float values.
out_bits
Bit-depth for int output, or used in the calculation of the
denominator for legal range ... | RGB_to_YcCbcCrc | python | colour-science/colour | colour/models/rgb/ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ycbcr.py | BSD-3-Clause |
def YcCbcCrc_to_RGB(
YcCbcCrc: ArrayLike,
in_bits: int = 10,
in_legal: bool = True,
in_int: bool = False,
is_12_bits_system: bool = False,
**kwargs: Any,
) -> NDArrayFloat:
"""
Convert an array of *Yc'Cbc'Crc'* colour encoding values to the
corresponding *RGB* array of linear values.... |
Convert an array of *Yc'Cbc'Crc'* colour encoding values to the
corresponding *RGB* array of linear values.
Parameters
----------
YcCbcCrc
Input *Yc'Cbc'Crc'* colour encoding array of linear float values.
in_bits
Bit-depth for int input, or used in the calculation of the
... | YcCbcCrc_to_RGB | python | colour-science/colour | colour/models/rgb/ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/ycbcr.py | BSD-3-Clause |
def _scale_domain_0_100_range_0_1(a: ArrayLike, callable_: Callable) -> NDArrayFloat:
"""
Scale the input domain of specified *luminance* :math:`Y` or *Lightness*
:math:`L^*` array to [0, 100], call the specified callable, and
scales the output range to [0, 1].
Parameters
----------
a
... |
Scale the input domain of specified *luminance* :math:`Y` or *Lightness*
:math:`L^*` array to [0, 100], call the specified callable, and
scales the output range to [0, 1].
Parameters
----------
a
*Luminance* :math:`Y` or *Lightness* :math:`L^*` array.
callable_
*Luminance* ... | _scale_domain_0_100_range_0_1 | python | colour-science/colour | colour/models/rgb/datasets/eci_rgb_v2.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/datasets/eci_rgb_v2.py | BSD-3-Clause |
def test_transformation_matrices(self) -> None:
"""
Test the transformations matrices from the
:attr:`colour.models.rgb.datasets.RGB_COLOURSPACES` attribute
colourspace models.
"""
tolerances = {
"Adobe RGB (1998)": 1e-5,
"ARRI Wide Gamut 3": 1e-6... |
Test the transformations matrices from the
:attr:`colour.models.rgb.datasets.RGB_COLOURSPACES` attribute
colourspace models.
| test_transformation_matrices | python | colour-science/colour | colour/models/rgb/datasets/tests/test__init__.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/datasets/tests/test__init__.py | BSD-3-Clause |
def test_cctf(self) -> None:
"""
Test colour component transfer functions from the
:attr:`colour.models.rgb.datasets.RGB_COLOURSPACES` attribute
colourspace models.
"""
ignored_colourspaces = ("ACESproxy",)
tolerance = {"DJI D-Gamut": 0.1, "F-Gamut": 1e-4, "N-Ga... |
Test colour component transfer functions from the
:attr:`colour.models.rgb.datasets.RGB_COLOURSPACES` attribute
colourspace models.
| test_cctf | python | colour-science/colour | colour/models/rgb/datasets/tests/test__init__.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/datasets/tests/test__init__.py | BSD-3-Clause |
def test_n_dimensional_cctf(self) -> None:
"""
Test colour component transfer functions from the
:attr:`colour.models.rgb.datasets.RGB_COLOURSPACES` attribute
colourspace models n-dimensional arrays support.
"""
tolerance = {"DJI D-Gamut": 1e-6, "F-Gamut": 1e-4}
... |
Test colour component transfer functions from the
:attr:`colour.models.rgb.datasets.RGB_COLOURSPACES` attribute
colourspace models n-dimensional arrays support.
| test_n_dimensional_cctf | python | colour-science/colour | colour/models/rgb/datasets/tests/test__init__.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/datasets/tests/test__init__.py | BSD-3-Clause |
def test_nan_cctf(self) -> None:
"""
Test colour component transfer functions from the
:attr:`colour.models.rgb.datasets.RGB_COLOURSPACES` attribute
colourspace models nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
for colourspace in RGB_COLOU... |
Test colour component transfer functions from the
:attr:`colour.models.rgb.datasets.RGB_COLOURSPACES` attribute
colourspace models nan support.
| test_nan_cctf | python | colour-science/colour | colour/models/rgb/datasets/tests/test__init__.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/datasets/tests/test__init__.py | BSD-3-Clause |
def test_RGB_to_CMY(self) -> None:
"""Test :func:`colour.models.rgb.cmyk.RGB_to_CMY` definition."""
np.testing.assert_allclose(
RGB_to_CMY(np.array([0.45620519, 0.03081071, 0.04091952])),
np.array([0.54379481, 0.96918929, 0.95908048]),
atol=TOLERANCE_ABSOLUTE_TESTS,
... | Test :func:`colour.models.rgb.cmyk.RGB_to_CMY` definition. | test_RGB_to_CMY | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_CMY(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.RGB_to_CMY` definition
n-dimensional arrays support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
CMY = RGB_to_CMY(RGB)
RGB = np.tile(RGB, (6, 1))
CMY = n... |
Test :func:`colour.models.rgb.cmyk.RGB_to_CMY` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_CMY | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_CMY(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.RGB_to_CMY` definition domain and
range scale support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
CMY = RGB_to_CMY(RGB)
d_r = (("reference", 1), ("1", 1), ... |
Test :func:`colour.models.rgb.cmyk.RGB_to_CMY` definition domain and
range scale support.
| test_domain_range_scale_RGB_to_CMY | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_nan_RGB_to_CMY(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.RGB_to_CMY` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_CMY(cases) |
Test :func:`colour.models.rgb.cmyk.RGB_to_CMY` definition nan
support.
| test_nan_RGB_to_CMY | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_CMY_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.cmyk.CMY_to_RGB` definition."""
np.testing.assert_allclose(
CMY_to_RGB(np.array([0.54379481, 0.96918929, 0.95908048])),
np.array([0.45620519, 0.03081071, 0.04091952]),
atol=TOLERANCE_ABSOLUTE_TESTS,
... | Test :func:`colour.models.rgb.cmyk.CMY_to_RGB` definition. | test_CMY_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_n_dimensional_CMY_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.CMY_to_RGB` definition
n-dimensional arrays support.
"""
CMY = np.array([0.54379481, 0.96918929, 0.95908048])
RGB = CMY_to_RGB(CMY)
CMY = np.tile(CMY, (6, 1))
RGB = n... |
Test :func:`colour.models.rgb.cmyk.CMY_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_CMY_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_domain_range_scale_CMY_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.CMY_to_RGB` definition domain and
range scale support.
"""
CMY = np.array([0.54379481, 0.96918929, 0.95908048])
RGB = CMY_to_RGB(CMY)
d_r = (("reference", 1), ("1", 1), ... |
Test :func:`colour.models.rgb.cmyk.CMY_to_RGB` definition domain and
range scale support.
| test_domain_range_scale_CMY_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_nan_CMY_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.cmyk.CMY_to_RGB` definition nan support."""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
CMY_to_RGB(cases) | Test :func:`colour.models.rgb.cmyk.CMY_to_RGB` definition nan support. | test_nan_CMY_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_CMY_to_CMYK(self) -> None:
"""Test :func:`colour.models.rgb.cmyk.CMY_to_CMYK` definition."""
np.testing.assert_allclose(
CMY_to_CMYK(np.array([0.54379481, 0.96918929, 0.95908048])),
np.array([0.00000000, 0.93246304, 0.91030457, 0.54379481]),
atol=TOLERANCE_A... | Test :func:`colour.models.rgb.cmyk.CMY_to_CMYK` definition. | test_CMY_to_CMYK | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_n_dimensional_CMY_to_CMYK(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.CMY_to_CMYK` definition
n-dimensional arrays support.
"""
CMY = np.array([0.54379481, 0.96918929, 0.95908048])
CMYK = CMY_to_CMYK(CMY)
CMY = np.tile(CMY, (6, 1))
CMY... |
Test :func:`colour.models.rgb.cmyk.CMY_to_CMYK` definition
n-dimensional arrays support.
| test_n_dimensional_CMY_to_CMYK | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_domain_range_scale_CMY_to_CMYK(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.CMY_to_CMYK` definition domain and
range scale support.
"""
CMY = np.array([0.54379481, 0.96918929, 0.95908048])
CMYK = CMY_to_CMYK(CMY)
d_r = (("reference", 1), ("1", ... |
Test :func:`colour.models.rgb.cmyk.CMY_to_CMYK` definition domain and
range scale support.
| test_domain_range_scale_CMY_to_CMYK | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_nan_CMY_to_CMYK(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.CMY_to_CMYK` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
CMY_to_CMYK(cases) |
Test :func:`colour.models.rgb.cmyk.CMY_to_CMYK` definition nan
support.
| test_nan_CMY_to_CMYK | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_CMYK_to_CMY(self) -> None:
"""Test :func:`colour.models.rgb.cmyk.CMYK_to_CMY` definition."""
np.testing.assert_allclose(
CMYK_to_CMY(np.array([0.00000000, 0.93246304, 0.91030457, 0.54379481])),
np.array([0.54379481, 0.96918929, 0.95908048]),
atol=TOLERANCE_A... | Test :func:`colour.models.rgb.cmyk.CMYK_to_CMY` definition. | test_CMYK_to_CMY | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_n_dimensional_CMYK_to_CMY(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.CMYK_to_CMY` definition
n-dimensional arrays support.
"""
CMYK = np.array([0.00000000, 0.93246304, 0.91030457, 0.54379481])
CMY = CMYK_to_CMY(CMYK)
CMYK = np.tile(CMYK, (6, ... |
Test :func:`colour.models.rgb.cmyk.CMYK_to_CMY` definition
n-dimensional arrays support.
| test_n_dimensional_CMYK_to_CMY | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_domain_range_scale_CMYK_to_CMY(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.CMYK_to_CMY` definition domain and
range scale support.
"""
CMYK = np.array([0.00000000, 0.93246304, 0.91030457, 0.54379481])
CMY = CMYK_to_CMY(CMYK)
d_r = (("reference... |
Test :func:`colour.models.rgb.cmyk.CMYK_to_CMY` definition domain and
range scale support.
| test_domain_range_scale_CMYK_to_CMY | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_nan_CMYK_to_CMY(self) -> None:
"""
Test :func:`colour.models.rgb.cmyk.CMYK_to_CMY` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=4))))
CMYK_to_CMY(cases) |
Test :func:`colour.models.rgb.cmyk.CMYK_to_CMY` definition nan
support.
| test_nan_CMYK_to_CMY | python | colour-science/colour | colour/models/rgb/tests/test_cmyk.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cmyk.py | BSD-3-Clause |
def test_XYZ_to_sRGB(self) -> None:
"""Test :func:`colour.models.rgb.common.XYZ_to_sRGB` definition."""
np.testing.assert_allclose(
XYZ_to_sRGB(np.array([0.20654008, 0.12197225, 0.05136952])),
np.array([0.70573936, 0.19248266, 0.22354169]),
atol=TOLERANCE_ABSOLUTE_TE... | Test :func:`colour.models.rgb.common.XYZ_to_sRGB` definition. | test_XYZ_to_sRGB | python | colour-science/colour | colour/models/rgb/tests/test_common.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_common.py | BSD-3-Clause |
def test_sRGB_to_XYZ(self) -> None:
"""Test :func:`colour.models.rgb.common.sRGB_to_XYZ` definition."""
np.testing.assert_allclose(
sRGB_to_XYZ(np.array([0.70573936, 0.19248266, 0.22354169])),
np.array([0.20654290, 0.12197943, 0.05137140]),
atol=TOLERANCE_ABSOLUTE_TE... | Test :func:`colour.models.rgb.common.sRGB_to_XYZ` definition. | test_sRGB_to_XYZ | python | colour-science/colour | colour/models/rgb/tests/test_common.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_common.py | BSD-3-Clause |
def test_RGB_to_HSV(self) -> None:
"""Test :func:`colour.models.rgb.cylindrical.RGB_to_HSV` definition."""
np.testing.assert_allclose(
RGB_to_HSV(np.array([0.45620519, 0.03081071, 0.04091952])),
np.array([0.99603944, 0.93246304, 0.45620519]),
atol=TOLERANCE_ABSOLUTE_... | Test :func:`colour.models.rgb.cylindrical.RGB_to_HSV` definition. | test_RGB_to_HSV | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_HSV(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSV` definition
n-dimensional arrays support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HSV = RGB_to_HSV(RGB)
RGB = np.tile(RGB, (6, 1))
... |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSV` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_HSV | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_HSV(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSV` definition
domain and range scale support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HSV = RGB_to_HSV(RGB)
d_r = (("reference", 1), ("1... |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSV` definition
domain and range scale support.
| test_domain_range_scale_RGB_to_HSV | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_nan_RGB_to_HSV(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSV` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_HSV(cases) |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSV` definition nan
support.
| test_nan_RGB_to_HSV | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_HSV_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.cylindrical.HSV_to_RGB` definition."""
np.testing.assert_allclose(
HSV_to_RGB(np.array([0.99603944, 0.93246304, 0.45620519])),
np.array([0.45620519, 0.03081071, 0.04091952]),
atol=TOLERANCE_ABSOLUTE_... | Test :func:`colour.models.rgb.cylindrical.HSV_to_RGB` definition. | test_HSV_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_n_dimensional_HSV_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HSV_to_RGB` definition
n-dimensional arrays support.
"""
HSV = np.array([0.99603944, 0.93246304, 0.45620519])
RGB = HSV_to_RGB(HSV)
HSV = np.tile(HSV, (6, 1))
... |
Test :func:`colour.models.rgb.cylindrical.HSV_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_HSV_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_domain_range_scale_HSV_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HSV_to_RGB` definition
domain and range scale support.
"""
HSV = np.array([0.99603944, 0.93246304, 0.45620519])
RGB = HSV_to_RGB(HSV)
d_r = (("reference", 1), ("1... |
Test :func:`colour.models.rgb.cylindrical.HSV_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_HSV_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_nan_HSV_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HSV_to_RGB` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
HSV_to_RGB(cases) |
Test :func:`colour.models.rgb.cylindrical.HSV_to_RGB` definition nan
support.
| test_nan_HSV_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_RGB_to_HSL(self) -> None:
"""Test :func:`colour.models.rgb.cylindrical.RGB_to_HSL` definition."""
np.testing.assert_allclose(
RGB_to_HSL(np.array([0.45620519, 0.03081071, 0.04091952])),
np.array([0.99603944, 0.87347144, 0.24350795]),
atol=TOLERANCE_ABSOLUTE_... | Test :func:`colour.models.rgb.cylindrical.RGB_to_HSL` definition. | test_RGB_to_HSL | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_HSL(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSL` definition
n-dimensional arrays support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HSL = RGB_to_HSL(RGB)
RGB = np.tile(RGB, (6, 1))
... |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSL` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_HSL | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_HSL(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSL` definition
domain and range scale support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HSL = RGB_to_HSL(RGB)
d_r = (("reference", 1), ("1... |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSL` definition
domain and range scale support.
| test_domain_range_scale_RGB_to_HSL | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_nan_RGB_to_HSL(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSL` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_HSL(cases) |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HSL` definition nan
support.
| test_nan_RGB_to_HSL | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_HSL_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.cylindrical.HSL_to_RGB` definition."""
np.testing.assert_allclose(
HSL_to_RGB(np.array([0.99603944, 0.87347144, 0.24350795])),
np.array([0.45620519, 0.03081071, 0.04091952]),
atol=TOLERANCE_ABSOLUTE_... | Test :func:`colour.models.rgb.cylindrical.HSL_to_RGB` definition. | test_HSL_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_n_dimensional_HSL_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HSL_to_RGB` definition
n-dimensional arrays support.
"""
HSL = np.array([0.99603944, 0.87347144, 0.24350795])
RGB = HSL_to_RGB(HSL)
HSL = np.tile(HSL, (6, 1))
... |
Test :func:`colour.models.rgb.cylindrical.HSL_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_HSL_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_domain_range_scale_HSL_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HSL_to_RGB` definition
domain and range scale support.
"""
HSL = np.array([0.99603944, 0.87347144, 0.24350795])
RGB = HSL_to_RGB(HSL)
d_r = (("reference", 1), ("1... |
Test :func:`colour.models.rgb.cylindrical.HSL_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_HSL_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_nan_HSL_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HSL_to_RGB` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
HSL_to_RGB(cases) |
Test :func:`colour.models.rgb.cylindrical.HSL_to_RGB` definition nan
support.
| test_nan_HSL_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_RGB_to_HCL(self) -> None:
"""Test :func:`colour.models.rgb.cylindrical.RGB_to_HCL` definition."""
np.testing.assert_allclose(
RGB_to_HCL(np.array([0.45620519, 0.03081071, 0.04091952])),
np.array([-0.03167854, 0.2841715, 0.22859647]),
atol=TOLERANCE_ABSOLUTE_... | Test :func:`colour.models.rgb.cylindrical.RGB_to_HCL` definition. | test_RGB_to_HCL | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_HCL(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HCL` definition
n-dimensional arrays support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HCL = RGB_to_HCL(RGB)
RGB = np.tile(RGB, (6, 1))
... |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HCL` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_HCL | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_HCL(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HCL` definition
domain and range scale support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HCL = RGB_to_HCL(RGB)
d_r = (("reference", 1), ("1... |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HCL` definition
domain and range scale support.
| test_domain_range_scale_RGB_to_HCL | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_nan_RGB_to_HCL(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.RGB_to_HCL` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_HCL(cases) |
Test :func:`colour.models.rgb.cylindrical.RGB_to_HCL` definition nan
support.
| test_nan_RGB_to_HCL | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_HCL_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.cylindrical.HCL_to_RGB` definition."""
np.testing.assert_allclose(
HCL_to_RGB(np.array([-0.03167854, 0.28417150, 0.22859647])),
np.array([0.45620333, 0.03081048, 0.04091925]),
atol=TOLERANCE_ABSOLUTE... | Test :func:`colour.models.rgb.cylindrical.HCL_to_RGB` definition. | test_HCL_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_n_dimensional_HCL_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HCL_to_RGB` definition
n-dimensional arrays support.
"""
HCL = np.array([0.99603944, 0.87347144, 0.24350795])
RGB = HCL_to_RGB(HCL)
HCL = np.tile(HCL, (6, 1))
... |
Test :func:`colour.models.rgb.cylindrical.HCL_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_HCL_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_domain_range_scale_HCL_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HCL_to_RGB` definition
domain and range scale support.
"""
HCL = np.array([0.99603944, 0.87347144, 0.24350795])
RGB = HCL_to_RGB(HCL)
d_r = (("reference", 1), ("1... |
Test :func:`colour.models.rgb.cylindrical.HCL_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_HCL_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_nan_HCL_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.cylindrical.HCL_to_RGB` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
HCL_to_RGB(cases) |
Test :func:`colour.models.rgb.cylindrical.HCL_to_RGB` definition nan
support.
| test_nan_HCL_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_cylindrical.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_cylindrical.py | BSD-3-Clause |
def test_xy_to_z(self) -> None:
"""Test :func:`colour.models.rgb.derivation.xy_to_z` definition."""
np.testing.assert_allclose(
xy_to_z(np.array([0.2500, 0.2500])),
0.50000000,
atol=TOLERANCE_ABSOLUTE_TESTS,
)
np.testing.assert_allclose(
... | Test :func:`colour.models.rgb.derivation.xy_to_z` definition. | test_xy_to_z | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_n_dimensional_xy_to_z(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.xy_to_z` definition
n-dimensional arrays support.
"""
xy = np.array([0.25, 0.25])
z = xy_to_z(xy)
xy = np.tile(xy, (6, 1))
z = np.tile(
z,
... |
Test :func:`colour.models.rgb.derivation.xy_to_z` definition
n-dimensional arrays support.
| test_n_dimensional_xy_to_z | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_nan_xy_to_z(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.xy_to_z` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=2))))
xy_to_z(cases) |
Test :func:`colour.models.rgb.derivation.xy_to_z` definition nan
support.
| test_nan_xy_to_z | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_normalised_primary_matrix(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.normalised_primary_matrix`
definition.
"""
np.testing.assert_allclose(
normalised_primary_matrix(
np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.... |
Test :func:`colour.models.rgb.derivation.normalised_primary_matrix`
definition.
| test_normalised_primary_matrix | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_nan_normalised_primary_matrix(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.normalised_primary_matrix`
definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=2))))
for c... |
Test :func:`colour.models.rgb.derivation.normalised_primary_matrix`
definition nan support.
| test_nan_normalised_primary_matrix | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.