Skip to content

Commit

Permalink
Remove "domain-range" scale of `colour.adaptation.matrix_chromatic_ad…
Browse files Browse the repository at this point in the history
…aptation_VonKries` definition.
  • Loading branch information
KelSolaar committed May 26, 2024
1 parent 5fa6ed3 commit f9db233
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions colour/adaptation/tests/test_vonkries.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_domain_range_scale_matrix_chromatic_adaptation_VonKries(self):
XYZ_wr = np.array([0.96429568, 1.00000000, 0.82510460])
M = matrix_chromatic_adaptation_VonKries(XYZ_w, XYZ_wr)

d_r = (("reference", 1), ("1", 1), ("100", 0.01))
d_r = (("reference", 1), ("1", 1), ("100", 100))
for scale, factor in d_r:
with domain_range_scale(scale):
np.testing.assert_allclose(
Expand Down Expand Up @@ -307,7 +307,7 @@ def test_domain_range_scale_chromatic_adaptation_VonKries(self):
XYZ_wr = np.array([0.96429568, 1.00000000, 0.82510460])
XYZ_a = chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr)

d_r = (("reference", 1), ("1", 1), ("100", 0.01))
d_r = (("reference", 1), ("1", 1), ("100", 100))
for scale, factor in d_r:
with domain_range_scale(scale):
np.testing.assert_allclose(
Expand Down
5 changes: 3 additions & 2 deletions colour/adaptation/vonkries.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
NDArrayFloat,
)
from colour.utilities import (
as_float_array,
from_range_1,
row_as_diagonal,
to_domain_1,
Expand Down Expand Up @@ -105,8 +106,8 @@ def matrix_chromatic_adaptation_VonKries(
[-0.0092430..., 0.0150551..., 0.7518742...]])
"""

XYZ_w = to_domain_1(XYZ_w)
XYZ_wr = to_domain_1(XYZ_wr)
XYZ_w = as_float_array(XYZ_w)
XYZ_wr = as_float_array(XYZ_wr)

transform = validate_method(
transform,
Expand Down

0 comments on commit f9db233

Please sign in to comment.