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 test_XYZ_to_IgPgTg(self) -> None: """Test :func:`colour.models.igpgtg.XYZ_to_IgPgTg` definition.""" np.testing.assert_allclose( XYZ_to_IgPgTg(np.array([0.20654008, 0.12197225, 0.05136952])), np.array([0.42421258, 0.18632491, 0.10689223]), atol=TOLERANCE_ABSOLUTE_...
Test :func:`colour.models.igpgtg.XYZ_to_IgPgTg` definition.
test_XYZ_to_IgPgTg
python
colour-science/colour
colour/models/tests/test_igpgtg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_igpgtg.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_IgPgTg(self) -> None: """ Test :func:`colour.models.igpgtg.XYZ_to_IgPgTg` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) IgPgTg = XYZ_to_IgPgTg(XYZ) XYZ = np.tile(XYZ, (6, 1)) IgPg...
Test :func:`colour.models.igpgtg.XYZ_to_IgPgTg` definition n-dimensional support.
test_n_dimensional_XYZ_to_IgPgTg
python
colour-science/colour
colour/models/tests/test_igpgtg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_igpgtg.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_IgPgTg(self) -> None: """ Test :func:`colour.models.igpgtg.XYZ_to_IgPgTg` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) IgPgTg = XYZ_to_IgPgTg(XYZ) d_r = (("reference", 1), ...
Test :func:`colour.models.igpgtg.XYZ_to_IgPgTg` definition domain and range scale support.
test_domain_range_scale_XYZ_to_IgPgTg
python
colour-science/colour
colour/models/tests/test_igpgtg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_igpgtg.py
BSD-3-Clause
def test_nan_XYZ_to_IgPgTg(self) -> None: """ Test :func:`colour.models.igpgtg.XYZ_to_IgPgTg` 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)))) XYZ_to_IgPgTg(cases)
Test :func:`colour.models.igpgtg.XYZ_to_IgPgTg` definition nan support.
test_nan_XYZ_to_IgPgTg
python
colour-science/colour
colour/models/tests/test_igpgtg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_igpgtg.py
BSD-3-Clause
def test_IgPgTg_to_XYZ(self) -> None: """Test :func:`colour.models.igpgtg.IgPgTg_to_XYZ` definition.""" np.testing.assert_allclose( IgPgTg_to_XYZ(np.array([0.42421258, 0.18632491, 0.10689223])), np.array([0.20654008, 0.12197225, 0.05136952]), atol=TOLERANCE_ABSOLUTE_...
Test :func:`colour.models.igpgtg.IgPgTg_to_XYZ` definition.
test_IgPgTg_to_XYZ
python
colour-science/colour
colour/models/tests/test_igpgtg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_igpgtg.py
BSD-3-Clause
def test_n_dimensional_IgPgTg_to_XYZ(self) -> None: """ Test :func:`colour.models.igpgtg.IgPgTg_to_XYZ` definition n-dimensional support. """ IgPgTg = np.array([0.42421258, 0.18632491, 0.10689223]) XYZ = IgPgTg_to_XYZ(IgPgTg) IgPgTg = np.tile(IgPgTg, (6, 1)) ...
Test :func:`colour.models.igpgtg.IgPgTg_to_XYZ` definition n-dimensional support.
test_n_dimensional_IgPgTg_to_XYZ
python
colour-science/colour
colour/models/tests/test_igpgtg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_igpgtg.py
BSD-3-Clause
def test_domain_range_scale_IgPgTg_to_XYZ(self) -> None: """ Test :func:`colour.models.igpgtg.IgPgTg_to_XYZ` definition domain and range scale support. """ IgPgTg = np.array([0.42421258, 0.18632491, 0.10689223]) XYZ = IgPgTg_to_XYZ(IgPgTg) d_r = (("reference", 1...
Test :func:`colour.models.igpgtg.IgPgTg_to_XYZ` definition domain and range scale support.
test_domain_range_scale_IgPgTg_to_XYZ
python
colour-science/colour
colour/models/tests/test_igpgtg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_igpgtg.py
BSD-3-Clause
def test_nan_IgPgTg_to_XYZ(self) -> None: """ Test :func:`colour.models.igpgtg.IgPgTg_to_XYZ` 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)))) IgPgTg_to_XYZ(cases)
Test :func:`colour.models.igpgtg.IgPgTg_to_XYZ` definition nan support.
test_nan_IgPgTg_to_XYZ
python
colour-science/colour
colour/models/tests/test_igpgtg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_igpgtg.py
BSD-3-Clause
def test_XYZ_to_IPT(self) -> None: """Test :func:`colour.models.ipt.XYZ_to_IPT` definition.""" np.testing.assert_allclose( XYZ_to_IPT(np.array([0.20654008, 0.12197225, 0.05136952])), np.array([0.38426191, 0.38487306, 0.18886838]), atol=TOLERANCE_ABSOLUTE_TESTS, ...
Test :func:`colour.models.ipt.XYZ_to_IPT` definition.
test_XYZ_to_IPT
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_IPT(self) -> None: """ Test :func:`colour.models.ipt.XYZ_to_IPT` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) IPT = XYZ_to_IPT(XYZ) XYZ = np.tile(XYZ, (6, 1)) IPT = np.tile(IPT, ...
Test :func:`colour.models.ipt.XYZ_to_IPT` definition n-dimensional support.
test_n_dimensional_XYZ_to_IPT
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_IPT(self) -> None: """ Test :func:`colour.models.ipt.XYZ_to_IPT` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) IPT = XYZ_to_IPT(XYZ) d_r = (("reference", 1), ("1", 1), ("100...
Test :func:`colour.models.ipt.XYZ_to_IPT` definition domain and range scale support.
test_domain_range_scale_XYZ_to_IPT
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_nan_XYZ_to_IPT(self) -> None: """Test :func:`colour.models.ipt.XYZ_to_IPT` 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)))) XYZ_to_IPT(cases)
Test :func:`colour.models.ipt.XYZ_to_IPT` definition nan support.
test_nan_XYZ_to_IPT
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_IPT_to_XYZ(self) -> None: """Test :func:`colour.models.ipt.IPT_to_XYZ` definition.""" np.testing.assert_allclose( IPT_to_XYZ(np.array([0.38426191, 0.38487306, 0.18886838])), np.array([0.20654008, 0.12197225, 0.05136952]), atol=TOLERANCE_ABSOLUTE_TESTS, ...
Test :func:`colour.models.ipt.IPT_to_XYZ` definition.
test_IPT_to_XYZ
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_n_dimensional_IPT_to_XYZ(self) -> None: """ Test :func:`colour.models.ipt.IPT_to_XYZ` definition n-dimensional support. """ IPT = np.array([0.38426191, 0.38487306, 0.18886838]) XYZ = IPT_to_XYZ(IPT) IPT = np.tile(IPT, (6, 1)) XYZ = np.tile(XYZ, ...
Test :func:`colour.models.ipt.IPT_to_XYZ` definition n-dimensional support.
test_n_dimensional_IPT_to_XYZ
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_domain_range_scale_IPT_to_XYZ(self) -> None: """ Test :func:`colour.models.ipt.IPT_to_XYZ` definition domain and range scale support. """ IPT = np.array([0.38426191, 0.38487306, 0.18886838]) XYZ = IPT_to_XYZ(IPT) d_r = (("reference", 1), ("1", 1), ("100...
Test :func:`colour.models.ipt.IPT_to_XYZ` definition domain and range scale support.
test_domain_range_scale_IPT_to_XYZ
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_nan_IPT_to_XYZ(self) -> None: """Test :func:`colour.models.ipt.IPT_to_XYZ` 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)))) IPT_to_XYZ(cases)
Test :func:`colour.models.ipt.IPT_to_XYZ` definition nan support.
test_nan_IPT_to_XYZ
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_IPT_hue_angle(self) -> None: """Test :func:`colour.models.ipt.IPT_hue_angle` definition.""" np.testing.assert_allclose( IPT_hue_angle(np.array([0.20654008, 0.12197225, 0.05136952])), 22.838754548625527, atol=TOLERANCE_ABSOLUTE_TESTS, ) np.te...
Test :func:`colour.models.ipt.IPT_hue_angle` definition.
test_IPT_hue_angle
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_n_dimensional_IPT_hue_angle(self) -> None: """ Test :func:`colour.models.ipt.IPT_hue_angle` definition n-dimensional support. """ IPT = np.array([0.20654008, 0.12197225, 0.05136952]) hue = IPT_hue_angle(IPT) IPT = np.tile(IPT, (6, 1)) hue = np.t...
Test :func:`colour.models.ipt.IPT_hue_angle` definition n-dimensional support.
test_n_dimensional_IPT_hue_angle
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_domain_range_scale_IPT_hue_angle(self) -> None: """ Test :func:`colour.models.ipt.IPT_hue_angle` definition domain and range scale support. """ IPT = np.array([0.20654008, 0.12197225, 0.05136952]) hue = IPT_hue_angle(IPT) d_r = (("reference", 1, 1), ("1...
Test :func:`colour.models.ipt.IPT_hue_angle` definition domain and range scale support.
test_domain_range_scale_IPT_hue_angle
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_nan_IPT_hue_angle(self) -> None: """Test :func:`colour.models.ipt.IPT_hue_angle` 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)))) IPT_hue_angle(cases)
Test :func:`colour.models.ipt.IPT_hue_angle` definition nan support.
test_nan_IPT_hue_angle
python
colour-science/colour
colour/models/tests/test_ipt.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ipt.py
BSD-3-Clause
def test_XYZ_to_Izazbz(self) -> None: """Test :func:`colour.models.jzazbz.XYZ_to_Izazbz` definition.""" np.testing.assert_allclose( XYZ_to_Izazbz(np.array([0.20654008, 0.12197225, 0.05136952])), np.array([0.01207793, 0.00924302, 0.00526007]), atol=TOLERANCE_ABSOLUTE_...
Test :func:`colour.models.jzazbz.XYZ_to_Izazbz` definition.
test_XYZ_to_Izazbz
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_Izazbz(self) -> None: """ Test :func:`colour.models.jzazbz.XYZ_to_Izazbz` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) Izazbz = XYZ_to_Izazbz(XYZ) XYZ = np.tile(XYZ, (6, 1)) Izaz...
Test :func:`colour.models.jzazbz.XYZ_to_Izazbz` definition n-dimensional support.
test_n_dimensional_XYZ_to_Izazbz
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_Izazbz(self) -> None: """ Test :func:`colour.models.jzazbz.XYZ_to_Izazbz` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) Izazbz = XYZ_to_Izazbz(XYZ) d_r = (("reference", 1), ...
Test :func:`colour.models.jzazbz.XYZ_to_Izazbz` definition domain and range scale support.
test_domain_range_scale_XYZ_to_Izazbz
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_nan_XYZ_to_Izazbz(self) -> None: """ Test :func:`colour.models.jzazbz.XYZ_to_Izazbz` 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)))) XYZ_to_Izazbz(cases)
Test :func:`colour.models.jzazbz.XYZ_to_Izazbz` definition nan support.
test_nan_XYZ_to_Izazbz
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_Izazbz_to_XYZ(self) -> None: """Test :func:`colour.models.jzazbz.Izazbz_to_XYZ` definition.""" np.testing.assert_allclose( Izazbz_to_XYZ(np.array([0.01207793, 0.00924302, 0.00526007])), np.array([0.20654008, 0.12197225, 0.05136952]), atol=TOLERANCE_ABSOLUTE_...
Test :func:`colour.models.jzazbz.Izazbz_to_XYZ` definition.
test_Izazbz_to_XYZ
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_n_dimensional_Izazbz_to_XYZ(self) -> None: """ Test :func:`colour.models.jzazbz.Izazbz_to_XYZ` definition n-dimensional support. """ Izazbz = np.array([0.01207793, 0.00924302, 0.00526007]) XYZ = Izazbz_to_XYZ(Izazbz) Izazbz = np.tile(Izazbz, (6, 1)) ...
Test :func:`colour.models.jzazbz.Izazbz_to_XYZ` definition n-dimensional support.
test_n_dimensional_Izazbz_to_XYZ
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_domain_range_scale_Izazbz_to_XYZ(self) -> None: """ Test :func:`colour.models.jzazbz.Izazbz_to_XYZ` definition domain and range scale support. """ Izazbz = np.array([0.01207793, 0.00924302, 0.00526007]) XYZ = Izazbz_to_XYZ(Izazbz) d_r = (("reference", 1...
Test :func:`colour.models.jzazbz.Izazbz_to_XYZ` definition domain and range scale support.
test_domain_range_scale_Izazbz_to_XYZ
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_nan_Izazbz_to_XYZ(self) -> None: """ Test :func:`colour.models.jzazbz.Izazbz_to_XYZ` 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)))) Izazbz_to_XYZ(cases)
Test :func:`colour.models.jzazbz.Izazbz_to_XYZ` definition nan support.
test_nan_Izazbz_to_XYZ
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_XYZ_to_Jzazbz(self) -> None: """Test :func:`colour.models.jzazbz.XYZ_to_Jzazbz` definition.""" np.testing.assert_allclose( XYZ_to_Jzazbz(np.array([0.20654008, 0.12197225, 0.05136952])), np.array([0.00535048, 0.00924302, 0.00526007]), atol=TOLERANCE_ABSOLUTE_...
Test :func:`colour.models.jzazbz.XYZ_to_Jzazbz` definition.
test_XYZ_to_Jzazbz
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_Jzazbz(self) -> None: """ Test :func:`colour.models.jzazbz.XYZ_to_Jzazbz` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) Jzazbz = XYZ_to_Jzazbz(XYZ) XYZ = np.tile(XYZ, (6, 1)) Jzaz...
Test :func:`colour.models.jzazbz.XYZ_to_Jzazbz` definition n-dimensional support.
test_n_dimensional_XYZ_to_Jzazbz
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_Jzazbz(self) -> None: """ Test :func:`colour.models.jzazbz.XYZ_to_Jzazbz` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) Jzazbz = XYZ_to_Jzazbz(XYZ) d_r = (("reference", 1), ...
Test :func:`colour.models.jzazbz.XYZ_to_Jzazbz` definition domain and range scale support.
test_domain_range_scale_XYZ_to_Jzazbz
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_nan_XYZ_to_Jzazbz(self) -> None: """ Test :func:`colour.models.jzazbz.XYZ_to_Jzazbz` 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)))) XYZ_to_Jzazbz(cases)
Test :func:`colour.models.jzazbz.XYZ_to_Jzazbz` definition nan support.
test_nan_XYZ_to_Jzazbz
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_Jzazbz_to_XYZ(self) -> None: """Test :func:`colour.models.jzazbz.Jzazbz_to_XYZ` definition.""" np.testing.assert_allclose( Jzazbz_to_XYZ(np.array([0.00535048, 0.00924302, 0.00526007])), np.array([0.20654008, 0.12197225, 0.05136952]), atol=1e-6, ) ...
Test :func:`colour.models.jzazbz.Jzazbz_to_XYZ` definition.
test_Jzazbz_to_XYZ
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_n_dimensional_Jzazbz_to_XYZ(self) -> None: """ Test :func:`colour.models.jzazbz.Jzazbz_to_XYZ` definition n-dimensional support. """ Jzazbz = np.array([0.00535048, 0.00924302, 0.00526007]) XYZ = Jzazbz_to_XYZ(Jzazbz) Jzazbz = np.tile(Jzazbz, (6, 1)) ...
Test :func:`colour.models.jzazbz.Jzazbz_to_XYZ` definition n-dimensional support.
test_n_dimensional_Jzazbz_to_XYZ
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_domain_range_scale_Jzazbz_to_XYZ(self) -> None: """ Test :func:`colour.models.jzazbz.Jzazbz_to_XYZ` definition domain and range scale support. """ Jzazbz = np.array([0.00535048, 0.00924302, 0.00526007]) XYZ = Jzazbz_to_XYZ(Jzazbz) d_r = (("reference", 1...
Test :func:`colour.models.jzazbz.Jzazbz_to_XYZ` definition domain and range scale support.
test_domain_range_scale_Jzazbz_to_XYZ
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_nan_Jzazbz_to_XYZ(self) -> None: """ Test :func:`colour.models.jzazbz.Jzazbz_to_XYZ` 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)))) Jzazbz_to_XYZ(cases)
Test :func:`colour.models.jzazbz.Jzazbz_to_XYZ` definition nan support.
test_nan_Jzazbz_to_XYZ
python
colour-science/colour
colour/models/tests/test_jzazbz.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_jzazbz.py
BSD-3-Clause
def test_XYZ_to_Oklab(self) -> None: """Test :func:`colour.models.oklab.XYZ_to_Oklab` definition.""" np.testing.assert_allclose( XYZ_to_Oklab(np.array([0.20654008, 0.12197225, 0.05136952])), np.array([0.51634019, 0.15469500, 0.06289579]), atol=TOLERANCE_ABSOLUTE_TEST...
Test :func:`colour.models.oklab.XYZ_to_Oklab` definition.
test_XYZ_to_Oklab
python
colour-science/colour
colour/models/tests/test_oklab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_oklab.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_Oklab(self) -> None: """ Test :func:`colour.models.oklab.XYZ_to_Oklab` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) Oklab = XYZ_to_Oklab(XYZ) XYZ = np.tile(XYZ, (6, 1)) Oklab = n...
Test :func:`colour.models.oklab.XYZ_to_Oklab` definition n-dimensional support.
test_n_dimensional_XYZ_to_Oklab
python
colour-science/colour
colour/models/tests/test_oklab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_oklab.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_Oklab(self) -> None: """ Test :func:`colour.models.oklab.XYZ_to_Oklab` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) Oklab = XYZ_to_Oklab(XYZ) d_r = (("reference", 1), ("1",...
Test :func:`colour.models.oklab.XYZ_to_Oklab` definition domain and range scale support.
test_domain_range_scale_XYZ_to_Oklab
python
colour-science/colour
colour/models/tests/test_oklab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_oklab.py
BSD-3-Clause
def test_nan_XYZ_to_Oklab(self) -> None: """ Test :func:`colour.models.oklab.XYZ_to_Oklab` 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)))) XYZ_to_Oklab(cases)
Test :func:`colour.models.oklab.XYZ_to_Oklab` definition nan support.
test_nan_XYZ_to_Oklab
python
colour-science/colour
colour/models/tests/test_oklab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_oklab.py
BSD-3-Clause
def test_Oklab_to_XYZ(self) -> None: """Test :func:`colour.models.oklab.Oklab_to_XYZ` definition.""" np.testing.assert_allclose( Oklab_to_XYZ(np.array([0.51634019, 0.15469500, 0.06289579])), np.array([0.20654008, 0.12197225, 0.05136952]), atol=1e-6, ) ...
Test :func:`colour.models.oklab.Oklab_to_XYZ` definition.
test_Oklab_to_XYZ
python
colour-science/colour
colour/models/tests/test_oklab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_oklab.py
BSD-3-Clause
def test_n_dimensional_Oklab_to_XYZ(self) -> None: """ Test :func:`colour.models.oklab.Oklab_to_XYZ` definition n-dimensional support. """ Oklab = np.array([0.51634019, 0.15469500, 0.06289579]) XYZ = Oklab_to_XYZ(Oklab) Oklab = np.tile(Oklab, (6, 1)) XYZ...
Test :func:`colour.models.oklab.Oklab_to_XYZ` definition n-dimensional support.
test_n_dimensional_Oklab_to_XYZ
python
colour-science/colour
colour/models/tests/test_oklab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_oklab.py
BSD-3-Clause
def test_domain_range_scale_Oklab_to_XYZ(self) -> None: """ Test :func:`colour.models.oklab.Oklab_to_XYZ` definition domain and range scale support. """ Oklab = np.array([0.51634019, 0.15469500, 0.06289579]) XYZ = Oklab_to_XYZ(Oklab) d_r = (("reference", 1), ("1...
Test :func:`colour.models.oklab.Oklab_to_XYZ` definition domain and range scale support.
test_domain_range_scale_Oklab_to_XYZ
python
colour-science/colour
colour/models/tests/test_oklab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_oklab.py
BSD-3-Clause
def test_nan_Oklab_to_XYZ(self) -> None: """ Test :func:`colour.models.oklab.Oklab_to_XYZ` 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)))) Oklab_to_XYZ(cases)
Test :func:`colour.models.oklab.Oklab_to_XYZ` definition nan support.
test_nan_Oklab_to_XYZ
python
colour-science/colour
colour/models/tests/test_oklab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_oklab.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_OSA_UCS(self) -> None: """ Test :func:`colour.models.osa_ucs.XYZ_to_OSA_UCS` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) * 100 Ljg = XYZ_to_OSA_UCS(XYZ) XYZ = np.tile(XYZ, (6, 1)) ...
Test :func:`colour.models.osa_ucs.XYZ_to_OSA_UCS` definition n-dimensional support.
test_n_dimensional_XYZ_to_OSA_UCS
python
colour-science/colour
colour/models/tests/test_osa_ucs.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_osa_ucs.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_OSA_UCS(self) -> None: """ Test :func:`colour.models.osa_ucs.XYZ_to_OSA_UCS` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) * 100 Ljg = XYZ_to_OSA_UCS(XYZ) d_r = (("reference...
Test :func:`colour.models.osa_ucs.XYZ_to_OSA_UCS` definition domain and range scale support.
test_domain_range_scale_XYZ_to_OSA_UCS
python
colour-science/colour
colour/models/tests/test_osa_ucs.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_osa_ucs.py
BSD-3-Clause
def test_nan_XYZ_to_OSA_UCS(self) -> None: """ Test :func:`colour.models.osa_ucs.XYZ_to_OSA_UCS` 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)))) XYZ_to_OSA_UCS(cases)
Test :func:`colour.models.osa_ucs.XYZ_to_OSA_UCS` definition nan support.
test_nan_XYZ_to_OSA_UCS
python
colour-science/colour
colour/models/tests/test_osa_ucs.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_osa_ucs.py
BSD-3-Clause
def test_n_dimensional_OSA_UCS_to_XYZ(self) -> None: """ Test :func:`colour.models.osa_ucs.OSA_UCS_to_XYZ` definition n-dimensional support. """ Ljg = np.array([-3.00499790, 2.99713697, -9.66784231]) XYZ = OSA_UCS_to_XYZ(Ljg) Ljg = np.tile(Ljg, (6, 1)) X...
Test :func:`colour.models.osa_ucs.OSA_UCS_to_XYZ` definition n-dimensional support.
test_n_dimensional_OSA_UCS_to_XYZ
python
colour-science/colour
colour/models/tests/test_osa_ucs.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_osa_ucs.py
BSD-3-Clause
def test_domain_range_scale_OSA_UCS_to_XYZ(self) -> None: """ Test :func:`colour.models.osa_ucs.OSA_UCS_to_XYZ` definition domain and range scale support. """ Ljg = np.array([-3.00499790, 2.99713697, -9.66784231]) XYZ = OSA_UCS_to_XYZ(Ljg) d_r = (("reference", 1...
Test :func:`colour.models.osa_ucs.OSA_UCS_to_XYZ` definition domain and range scale support.
test_domain_range_scale_OSA_UCS_to_XYZ
python
colour-science/colour
colour/models/tests/test_osa_ucs.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_osa_ucs.py
BSD-3-Clause
def test_nan_OSA_UCS_to_XYZ(self) -> None: """ Test :func:`colour.models.osa_ucs.OSA_UCS_to_XYZ` 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)))) OSA_UCS_to_XYZ(cases)
Test :func:`colour.models.osa_ucs.OSA_UCS_to_XYZ` definition nan support.
test_nan_OSA_UCS_to_XYZ
python
colour-science/colour
colour/models/tests/test_osa_ucs.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_osa_ucs.py
BSD-3-Clause
def test_XYZ_to_ProLab(self) -> None: """Test :func:`colour.models.ProLab.XYZ_to_ProLab` definition.""" np.testing.assert_allclose( XYZ_to_ProLab(np.array([0.20654008, 0.12197225, 0.05136952])), np.array([48.7948929, 35.31503175, 13.30044932]), atol=TOLERANCE_ABSOLUT...
Test :func:`colour.models.ProLab.XYZ_to_ProLab` definition.
test_XYZ_to_ProLab
python
colour-science/colour
colour/models/tests/test_prolab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_prolab.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_ProLab(self) -> None: """ Test :func:`colour.models.prolab.XYZ_to_ProLab` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) ProLab = XYZ_to_ProLab(XYZ) XYZ = np.tile(XYZ, (6, 1)) ProL...
Test :func:`colour.models.prolab.XYZ_to_ProLab` definition n-dimensional support.
test_n_dimensional_XYZ_to_ProLab
python
colour-science/colour
colour/models/tests/test_prolab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_prolab.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_ProLab(self) -> None: """ Test :func:`colour.models.prolab.XYZ_to_ProLab` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) ProLab = XYZ_to_ProLab(XYZ) d_r = (("reference", 1), ...
Test :func:`colour.models.prolab.XYZ_to_ProLab` definition domain and range scale support.
test_domain_range_scale_XYZ_to_ProLab
python
colour-science/colour
colour/models/tests/test_prolab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_prolab.py
BSD-3-Clause
def test_nan_XYZ_to_ProLab(self) -> None: """ Test :func:`colour.models.ProLab.XYZ_to_ProLab` 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)))) XYZ_to_ProLab(cases)
Test :func:`colour.models.ProLab.XYZ_to_ProLab` definition nan support.
test_nan_XYZ_to_ProLab
python
colour-science/colour
colour/models/tests/test_prolab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_prolab.py
BSD-3-Clause
def test_ProLab_to_XYZ(self) -> None: """Test :func:`colour.models.ProLab.ProLab_to_XYZ` definition.""" np.testing.assert_allclose( ProLab_to_XYZ(np.array([48.7948929, 35.31503175, 13.30044932])), np.array([0.20654008, 0.12197225, 0.05136952]), atol=TOLERANCE_ABSOLUT...
Test :func:`colour.models.ProLab.ProLab_to_XYZ` definition.
test_ProLab_to_XYZ
python
colour-science/colour
colour/models/tests/test_prolab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_prolab.py
BSD-3-Clause
def test_nan_ProLab_to_XYZ(self) -> None: """ Test :func:`colour.models.ProLab.ProLab_to_XYZ` 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)))) ProLab_to_XYZ(cases)
Test :func:`colour.models.ProLab.ProLab_to_XYZ` definition nan support.
test_nan_ProLab_to_XYZ
python
colour-science/colour
colour/models/tests/test_prolab.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_prolab.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_IPT_Ragoo2021(self) -> None: """ Test :func:`colour.models.ragoo2021.XYZ_to_IPT_Ragoo2021` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) IPT = XYZ_to_IPT_Ragoo2021(XYZ) XYZ = np.tile(XYZ,...
Test :func:`colour.models.ragoo2021.XYZ_to_IPT_Ragoo2021` definition n-dimensional support.
test_n_dimensional_XYZ_to_IPT_Ragoo2021
python
colour-science/colour
colour/models/tests/test_ragoo2021.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ragoo2021.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_IPT_Ragoo2021(self) -> None: """ Test :func:`colour.models.ragoo2021.XYZ_to_IPT_Ragoo2021` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) IPT = XYZ_to_IPT_Ragoo2021(XYZ) d_r ...
Test :func:`colour.models.ragoo2021.XYZ_to_IPT_Ragoo2021` definition domain and range scale support.
test_domain_range_scale_XYZ_to_IPT_Ragoo2021
python
colour-science/colour
colour/models/tests/test_ragoo2021.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ragoo2021.py
BSD-3-Clause
def test_nan_XYZ_to_IPT_Ragoo2021(self) -> None: """ Test :func:`colour.models.ragoo2021.XYZ_to_IPT_Ragoo2021` 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)))) XYZ_to_IPT_Ragoo2021...
Test :func:`colour.models.ragoo2021.XYZ_to_IPT_Ragoo2021` definition nan support.
test_nan_XYZ_to_IPT_Ragoo2021
python
colour-science/colour
colour/models/tests/test_ragoo2021.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ragoo2021.py
BSD-3-Clause
def test_n_dimensional_IPT_Ragoo2021_to_XYZ(self) -> None: """ Test :func:`colour.models.ragoo2021.IPT_Ragoo2021_to_XYZ` definition n-dimensional support. """ IPT = np.array([0.42248243, 0.29105140, 0.20410663]) XYZ = IPT_Ragoo2021_to_XYZ(IPT) IPT = np.tile(IPT,...
Test :func:`colour.models.ragoo2021.IPT_Ragoo2021_to_XYZ` definition n-dimensional support.
test_n_dimensional_IPT_Ragoo2021_to_XYZ
python
colour-science/colour
colour/models/tests/test_ragoo2021.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ragoo2021.py
BSD-3-Clause
def test_domain_range_scale_IPT_Ragoo2021_to_XYZ(self) -> None: """ Test :func:`colour.models.ragoo2021.IPT_Ragoo2021_to_XYZ` definition domain and range scale support. """ IPT = np.array([0.42248243, 0.29105140, 0.20410663]) XYZ = IPT_Ragoo2021_to_XYZ(IPT) d_r ...
Test :func:`colour.models.ragoo2021.IPT_Ragoo2021_to_XYZ` definition domain and range scale support.
test_domain_range_scale_IPT_Ragoo2021_to_XYZ
python
colour-science/colour
colour/models/tests/test_ragoo2021.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ragoo2021.py
BSD-3-Clause
def test_nan_IPT_Ragoo2021_to_XYZ(self) -> None: """ Test :func:`colour.models.ragoo2021.IPT_Ragoo2021_to_XYZ` 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)))) IPT_Ragoo2021_to_XYZ...
Test :func:`colour.models.ragoo2021.IPT_Ragoo2021_to_XYZ` definition nan support.
test_nan_IPT_Ragoo2021_to_XYZ
python
colour-science/colour
colour/models/tests/test_ragoo2021.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_ragoo2021.py
BSD-3-Clause
def test_LMS_to_Yrg(self) -> None: """Test :func:`colour.models.yrg.LMS_to_Yrg` definition.""" np.testing.assert_allclose( LMS_to_Yrg(np.array([0.15639195, 0.06741689, 0.03281398])), np.array([0.13137801, 0.49037644, 0.37777391]), atol=TOLERANCE_ABSOLUTE_TESTS, ...
Test :func:`colour.models.yrg.LMS_to_Yrg` definition.
test_LMS_to_Yrg
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_n_dimensional_LMS_to_Yrg(self) -> None: """ Test :func:`colour.models.yrg.LMS_to_Yrg` definition n-dimensional support. """ LMS = np.array([0.15639195, 0.06741689, 0.03281398]) Yrg = LMS_to_Yrg(LMS) LMS = np.tile(LMS, (6, 1)) Yrg = np.tile(Yrg, ...
Test :func:`colour.models.yrg.LMS_to_Yrg` definition n-dimensional support.
test_n_dimensional_LMS_to_Yrg
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_domain_range_scale_LMS_to_Yrg(self) -> None: """ Test :func:`colour.models.yrg.LMS_to_Yrg` definition domain and range scale support. """ LMS = np.array([0.15639195, 0.06741689, 0.03281398]) Yrg = LMS_to_Yrg(LMS) d_r = (("reference", 1), ("1", 1), ("100...
Test :func:`colour.models.yrg.LMS_to_Yrg` definition domain and range scale support.
test_domain_range_scale_LMS_to_Yrg
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_nan_LMS_to_Yrg(self) -> None: """Test :func:`colour.models.yrg.LMS_to_Yrg` 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)))) LMS_to_Yrg(cases)
Test :func:`colour.models.yrg.LMS_to_Yrg` definition nan support.
test_nan_LMS_to_Yrg
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_Yrg_to_LMS(self) -> None: """Test :func:`colour.models.yrg.Yrg_to_LMS` definition.""" np.testing.assert_allclose( Yrg_to_LMS(np.array([0.13137801, 0.49037644, 0.37777391])), np.array([0.15639195, 0.06741689, 0.03281398]), atol=1e-4, ) np.tes...
Test :func:`colour.models.yrg.Yrg_to_LMS` definition.
test_Yrg_to_LMS
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_n_dimensional_Yrg_to_LMS(self) -> None: """ Test :func:`colour.models.yrg.Yrg_to_LMS` definition n-dimensional support. """ Yrg = np.array([0.00535048, 0.00924302, 0.00526007]) LMS = Yrg_to_LMS(Yrg) Yrg = np.tile(Yrg, (6, 1)) LMS = np.tile(LMS, ...
Test :func:`colour.models.yrg.Yrg_to_LMS` definition n-dimensional support.
test_n_dimensional_Yrg_to_LMS
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_domain_range_scale_Yrg_to_LMS(self) -> None: """ Test :func:`colour.models.yrg.Yrg_to_LMS` definition domain and range scale support. """ Yrg = np.array([0.00535048, 0.00924302, 0.00526007]) LMS = Yrg_to_LMS(Yrg) d_r = (("reference", 1), ("1", 1), ("100...
Test :func:`colour.models.yrg.Yrg_to_LMS` definition domain and range scale support.
test_domain_range_scale_Yrg_to_LMS
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_nan_Yrg_to_LMS(self) -> None: """Test :func:`colour.models.yrg.Yrg_to_LMS` 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)))) Yrg_to_LMS(cases)
Test :func:`colour.models.yrg.Yrg_to_LMS` definition nan support.
test_nan_Yrg_to_LMS
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_XYZ_to_Yrg(self) -> None: """Test :func:`colour.models.yrg.XYZ_to_Yrg` definition.""" np.testing.assert_allclose( XYZ_to_Yrg(np.array([0.20654008, 0.12197225, 0.05136952])), np.array([0.13137801, 0.49037645, 0.37777388]), atol=TOLERANCE_ABSOLUTE_TESTS, ...
Test :func:`colour.models.yrg.XYZ_to_Yrg` definition.
test_XYZ_to_Yrg
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_n_dimensional_XYZ_to_Yrg(self) -> None: """ Test :func:`colour.models.yrg.XYZ_to_Yrg` definition n-dimensional support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) Yrg = XYZ_to_Yrg(XYZ) XYZ = np.tile(XYZ, (6, 1)) Yrg = np.tile(Yrg, ...
Test :func:`colour.models.yrg.XYZ_to_Yrg` definition n-dimensional support.
test_n_dimensional_XYZ_to_Yrg
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_domain_range_scale_XYZ_to_Yrg(self) -> None: """ Test :func:`colour.models.yrg.XYZ_to_Yrg` definition domain and range scale support. """ XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) Yrg = XYZ_to_Yrg(XYZ) d_r = (("reference", 1), ("1", 1), ("100...
Test :func:`colour.models.yrg.XYZ_to_Yrg` definition domain and range scale support.
test_domain_range_scale_XYZ_to_Yrg
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_nan_XYZ_to_Yrg(self) -> None: """Test :func:`colour.models.yrg.XYZ_to_Yrg` 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)))) XYZ_to_Yrg(cases)
Test :func:`colour.models.yrg.XYZ_to_Yrg` definition nan support.
test_nan_XYZ_to_Yrg
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_Yrg_to_XYZ(self) -> None: """Test :func:`colour.models.yrg.Yrg_to_XYZ` definition.""" np.testing.assert_allclose( Yrg_to_XYZ(np.array([0.13137801, 0.49037645, 0.37777388])), np.array([0.20654008, 0.12197225, 0.05136952]), atol=1e-4, ) np.tes...
Test :func:`colour.models.yrg.Yrg_to_XYZ` definition.
test_Yrg_to_XYZ
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_n_dimensional_Yrg_to_XYZ(self) -> None: """ Test :func:`colour.models.yrg.Yrg_to_XYZ` definition n-dimensional support. """ Yrg = np.array([0.13137801, 0.49037645, 0.37777388]) XYZ = Yrg_to_XYZ(Yrg) Yrg = np.tile(Yrg, (6, 1)) XYZ = np.tile(XYZ, ...
Test :func:`colour.models.yrg.Yrg_to_XYZ` definition n-dimensional support.
test_n_dimensional_Yrg_to_XYZ
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_domain_range_scale_Yrg_to_XYZ(self) -> None: """ Test :func:`colour.models.yrg.Yrg_to_XYZ` definition domain and range scale support. """ Yrg = np.array([0.13137801, 0.49037645, 0.37777388]) XYZ = Yrg_to_XYZ(Yrg) d_r = (("reference", 1), ("1", 1), ("100...
Test :func:`colour.models.yrg.Yrg_to_XYZ` definition domain and range scale support.
test_domain_range_scale_Yrg_to_XYZ
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def test_nan_Yrg_to_XYZ(self) -> None: """Test :func:`colour.models.yrg.Yrg_to_XYZ` 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)))) Yrg_to_XYZ(cases)
Test :func:`colour.models.yrg.Yrg_to_XYZ` definition nan support.
test_nan_Yrg_to_XYZ
python
colour-science/colour
colour/models/tests/test_yrg.py
https://github.com/colour-science/colour/blob/master/colour/models/tests/test_yrg.py
BSD-3-Clause
def RGB_to_HEX(RGB: ArrayLike) -> NDArrayStr: """ Convert from *RGB* colourspace to hexadecimal representation. Parameters ---------- RGB *RGB* colourspace array. Returns ------- :class:`str` or :class:`numpy.array` Hexadecimal representation. Notes ----- +...
Convert from *RGB* colourspace to hexadecimal representation. Parameters ---------- RGB *RGB* colourspace array. Returns ------- :class:`str` or :class:`numpy.array` Hexadecimal representation. Notes ----- +------------+-----------------------+---------------+...
RGB_to_HEX
python
colour-science/colour
colour/notation/hexadecimal.py
https://github.com/colour-science/colour/blob/master/colour/notation/hexadecimal.py
BSD-3-Clause
def HEX_to_RGB(HEX: ArrayLike) -> NDArrayFloat: """ Convert from hexadecimal representation to *RGB* colourspace. Parameters ---------- HEX Hexadecimal representation. Returns ------- :class:`numpy.array` *RGB* colourspace array. Notes ----- +-----------+--...
Convert from hexadecimal representation to *RGB* colourspace. Parameters ---------- HEX Hexadecimal representation. Returns ------- :class:`numpy.array` *RGB* colourspace array. Notes ----- +-----------+-----------------------+---------------+ | **Range** ...
HEX_to_RGB
python
colour-science/colour
colour/notation/hexadecimal.py
https://github.com/colour-science/colour/blob/master/colour/notation/hexadecimal.py
BSD-3-Clause
def to_RGB(x: list) -> list: """Convert specified hexadecimal representation to *RGB*.""" l_x = len(x) return [ int(x[i : i + l_x // 3], 16) # pyright: ignore for i in range(0, l_x, l_x // 3) ]
Convert specified hexadecimal representation to *RGB*.
to_RGB
python
colour-science/colour
colour/notation/hexadecimal.py
https://github.com/colour-science/colour/blob/master/colour/notation/hexadecimal.py
BSD-3-Clause
def _munsell_specifications() -> NDArrayFloat: """ Return the *Munsell Renotation System* specifications and caches them if not existing. The *Munsell Renotation System* data is stored in :attr:`colour.notation.MUNSELL_COLOURS` attribute in a 2 columns form:: ( (("2.5GY", 0.2, ...
Return the *Munsell Renotation System* specifications and caches them if not existing. The *Munsell Renotation System* data is stored in :attr:`colour.notation.MUNSELL_COLOURS` attribute in a 2 columns form:: ( (("2.5GY", 0.2, 2.0), (0.713, 1.414, 0.237)), (("5GY", 0.2...
_munsell_specifications
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def _munsell_value_ASTMD1535_interpolator() -> Extrapolator: """ Return the *Munsell* value interpolator for *ASTM D1535-08e1* method and caches it if not existing. Returns ------- :class:`colour.Extrapolator` *Munsell* value interpolator for *ASTM D1535-08e1* method. """ globa...
Return the *Munsell* value interpolator for *ASTM D1535-08e1* method and caches it if not existing. Returns ------- :class:`colour.Extrapolator` *Munsell* value interpolator for *ASTM D1535-08e1* method.
_munsell_value_ASTMD1535_interpolator
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def _munsell_maximum_chromas_from_renotation() -> ( Tuple[Tuple[Tuple[float, float], float], ...] ): """ Return the maximum *Munsell* chromas from *Munsell Renotation System* data and caches them if not existing. Returns ------- :class:`tuple` Maximum *Munsell* chromas. """ ...
Return the maximum *Munsell* chromas from *Munsell Renotation System* data and caches them if not existing. Returns ------- :class:`tuple` Maximum *Munsell* chromas.
_munsell_maximum_chromas_from_renotation
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_value_Priest1920(Y: ArrayLike) -> NDArrayFloat: """ Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Priest et al. (1920)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.ND...
Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Priest et al. (1920)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.NDArrayFloat` *Munsell* value :math:`V`. Notes -----...
munsell_value_Priest1920
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_value_Munsell1933(Y: ArrayLike) -> NDArrayFloat: """ Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Munsell et al. (1933)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy....
Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Munsell et al. (1933)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.NDArrayFloat` *Munsell* value :math:`V`. Notes ----...
munsell_value_Munsell1933
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_value_Moon1943(Y: ArrayLike) -> NDArrayFloat: """ Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Moon and Spencer (1943)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy....
Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Moon and Spencer (1943)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.NDArrayFloat` *Munsell* value :math:`V`. Notes -...
munsell_value_Moon1943
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_value_Saunderson1944(Y: ArrayLike) -> NDArrayFloat: """ Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Saunderson and Milner (1944)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :cla...
Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Saunderson and Milner (1944)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.NDArrayFloat` *Munsell* value :math:`V`. Notes ...
munsell_value_Saunderson1944
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_value_Ladd1955(Y: ArrayLike) -> NDArrayFloat: """ Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Ladd and Pinney (1955)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.ND...
Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *Ladd and Pinney (1955)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.NDArrayFloat` *Munsell* value :math:`V`. Notes ---...
munsell_value_Ladd1955
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_value_McCamy1987(Y: ArrayLike) -> NDArrayFloat: """ Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *McCamy (1987)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.NDArrayFl...
Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using *McCamy (1987)* method. Parameters ---------- Y *Luminance* :math:`Y`. Returns ------- :class:`np.float` or :class:`numpy.NDArrayFloat` *Munsell* value :math:`V`. Notes ----- +-...
munsell_value_McCamy1987
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_value_ASTMD1535(Y: ArrayLike) -> NDArrayFloat: """ Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using an inverse lookup table from *ASTM D1535-08e1* method. Parameters ---------- Y *Luminance* :math:`Y` Returns ------- :class:`np.floa...
Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using an inverse lookup table from *ASTM D1535-08e1* method. Parameters ---------- Y *Luminance* :math:`Y` Returns ------- :class:`np.float` or :class:`numpy.NDArrayFloat` *Munsell* value :math:`V...
munsell_value_ASTMD1535
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_value( Y: ArrayLike, method: ( Literal[ "ASTM D1535", "Ladd 1955", "McCamy 1987", "Moon 1943", "Munsell 1933", "Priest 1920", "Saunderson 1944", ] | str ) = "ASTM D1535", ) -> NDArrayFloat...
Compute the *Munsell* value :math:`V` of specified *luminance* :math:`Y` using specified method. Parameters ---------- Y *Luminance* :math:`Y`. method Computation method. Returns ------- :class:`np.float` or :class:`numpy.NDArrayFloat` *Munsell* value :math...
munsell_value
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def _munsell_specification_to_xyY(specification: ArrayLike) -> NDArrayFloat: """ Convert specified *Munsell* *Colorlab* specification to *CIE xyY* colourspace. Parameters ---------- specification *Munsell* *Colorlab* specification. Returns ------- :class:`numpy.NDArrayFloat` ...
Convert specified *Munsell* *Colorlab* specification to *CIE xyY* colourspace. Parameters ---------- specification *Munsell* *Colorlab* specification. Returns ------- :class:`numpy.NDArrayFloat` *CIE xyY* colourspace array.
_munsell_specification_to_xyY
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_specification_to_xyY(specification: ArrayLike) -> NDArrayFloat: """ Convert specified *Munsell* *Colorlab* specification to *CIE xyY* colourspace. Parameters ---------- specification *Munsell* *Colorlab* specification. Returns ------- :class:`numpy.NDArrayFloat` ...
Convert specified *Munsell* *Colorlab* specification to *CIE xyY* colourspace. Parameters ---------- specification *Munsell* *Colorlab* specification. Returns ------- :class:`numpy.NDArrayFloat` *CIE xyY* colourspace array. Notes ----- +-------------------+---...
munsell_specification_to_xyY
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_colour_to_xyY(munsell_colour: ArrayLike) -> NDArrayFloat: """ Convert specified *Munsell* colour to *CIE xyY* colourspace. Parameters ---------- munsell_colour *Munsell* colour. Returns ------- :class:`numpy.NDArrayFloat` *CIE xyY* colourspace array. No...
Convert specified *Munsell* colour to *CIE xyY* colourspace. Parameters ---------- munsell_colour *Munsell* colour. Returns ------- :class:`numpy.NDArrayFloat` *CIE xyY* colourspace array. Notes ----- +-----------+-----------------------+---------------+ |...
munsell_colour_to_xyY
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def xyY_to_munsell_colour( xyY: ArrayLike, hue_decimals: int = 1, value_decimals: int = 1, chroma_decimals: int = 1, ) -> str | NDArrayStr: """ Convert from *CIE xyY* colourspace to *Munsell* colour. Parameters ---------- xyY *CIE xyY* colourspace array. hue_decimals ...
Convert from *CIE xyY* colourspace to *Munsell* colour. Parameters ---------- xyY *CIE xyY* colourspace array. hue_decimals Hue formatting decimals. value_decimals Value formatting decimals. chroma_decimals Chroma formatting decimals. Returns ------...
xyY_to_munsell_colour
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def parse_munsell_colour(munsell_colour: str) -> NDArrayFloat: """ Parse specified *Munsell* colour and return an intermediate *Munsell* *Colorlab* specification. Parameters ---------- munsell_colour *Munsell* colour. Returns ------- :class:`numpy.NDArrayFloat` Inte...
Parse specified *Munsell* colour and return an intermediate *Munsell* *Colorlab* specification. Parameters ---------- munsell_colour *Munsell* colour. Returns ------- :class:`numpy.NDArrayFloat` Intermediate *Munsell* *Colorlab* specification. Raises ------ ...
parse_munsell_colour
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def is_grey_munsell_colour(specification: ArrayLike) -> bool: """ Return whether specified *Munsell* *Colorlab* specification is a grey colour. Parameters ---------- specification *Munsell* *Colorlab* specification. Returns ------- :class:`bool` Is specification a grey ...
Return whether specified *Munsell* *Colorlab* specification is a grey colour. Parameters ---------- specification *Munsell* *Colorlab* specification. Returns ------- :class:`bool` Is specification a grey colour. Examples -------- >>> is_grey_munsell_colour(np....
is_grey_munsell_colour
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def normalise_munsell_specification(specification: ArrayLike) -> NDArrayFloat: """ Normalise specified *Munsell* *Colorlab* specification. Parameters ---------- specification *Munsell* *Colorlab* specification. Returns ------- :class:`numpy.NDArrayFloat` Normalised *Mun...
Normalise specified *Munsell* *Colorlab* specification. Parameters ---------- specification *Munsell* *Colorlab* specification. Returns ------- :class:`numpy.NDArrayFloat` Normalised *Munsell* *Colorlab* specification. Examples -------- >>> normalise_munsell_s...
normalise_munsell_specification
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause
def munsell_colour_to_munsell_specification( munsell_colour: str, ) -> NDArrayFloat: """ Retrieve a normalised *Munsell* *Colorlab* specification from specified *Munsell* colour. Parameters ---------- munsell_colour *Munsell* colour. Returns ------- :class:`numpy.NDArra...
Retrieve a normalised *Munsell* *Colorlab* specification from specified *Munsell* colour. Parameters ---------- munsell_colour *Munsell* colour. Returns ------- :class:`numpy.NDArrayFloat` Normalised *Munsell* *Colorlab* specification. Examples -------- >>...
munsell_colour_to_munsell_specification
python
colour-science/colour
colour/notation/munsell.py
https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py
BSD-3-Clause