Skip to content

Commit

Permalink
Update "colour.EPSILON" constant value.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Jun 6, 2017
1 parent fae10d8 commit 2f770bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion colour/appearance/ciecam02.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
HPE_TO_XYZ_MATRIX,
XYZ_TO_HPE_MATRIX,
luminance_level_adaptation_factor)
from colour.constants import EPSILON
from colour.utilities import (
CaseInsensitiveMapping,
as_numeric,
Expand Down Expand Up @@ -1183,7 +1184,7 @@ def temporary_magnitude_quantity_reverse(C, J, n):
"""

C = np.asarray(C)
J = np.maximum(np.asarray(J), np.finfo(np.float_).eps)
J = np.maximum(J, EPSILON)
n = np.asarray(n)

t = (C / (np.sqrt(J / 100) * (1.64 - 0.29 ** n) ** 0.73)) ** (1 / 0.9)
Expand Down
4 changes: 3 additions & 1 deletion colour/constants/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

from __future__ import division, unicode_literals

import numpy as np

__author__ = 'Colour Developers'
__copyright__ = 'Copyright (C) 2013-2017 - Colour Developers'
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause'
Expand All @@ -35,7 +37,7 @@
INTEGER_THRESHOLD : numeric
"""

EPSILON = 1e-15
EPSILON = np.finfo(np.float_).eps
"""
Default epsilon value for tolerance and singularities avoidance in various
computations.
Expand Down

0 comments on commit 2f770bc

Please sign in to comment.