Skip to content

Commit

Permalink
Use consistent data in "colour.models.ipt" module doc tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Sep 10, 2014
1 parent 845a8b4 commit 3279a85
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions colour/models/ipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def XYZ_to_IPT(XYZ):
Examples
--------
>>> XYZ = np.array([0.96907232, 1, 1.12179215])
>>> XYZ = np.array([0.07049534, 0.1008, 0.09558313])
>>> XYZ_to_IPT(XYZ) # doctest: +ELLIPSIS
array([ 1.0030082..., 0.0190691..., -0.0136929...])
array([ 0.3657112..., -0.1111479..., 0.0159474...])
"""

LMS = np.dot(IPT_XYZ_TO_LMS_MATRIX, XYZ)
Expand All @@ -138,9 +138,9 @@ def IPT_to_XYZ(IPT):
Examples
--------
>>> IPT = np.array([1.00300825, 0.01906918, -0.01369292])
>>> IPT = np.array([0.36571124, -0.11114798, 0.01594746])
>>> IPT_to_XYZ(IPT) # doctest: +ELLIPSIS
array([ 0.9689994..., 0.9999576..., 1.1218432...])
array([ 0.0704827..., 0.1007966..., 0.0955884...])
"""

LMS = np.dot(IPT_IPT_TO_LMS_MATRIX, IPT)
Expand All @@ -166,8 +166,9 @@ def IPT_hue_angle(IPT):
Examples
--------
>>> IPT_hue_angle(([0.96907232, 1, 1.12179215])) # doctest: +ELLIPSIS
0.8427358...
>>> IPT = np.array([0.07049534, 0.1008, 0.09558313])
>>> IPT_hue_angle(IPT) # doctest: +ELLIPSIS
0.7588396...
"""

return np.arctan2(IPT[2], IPT[1])

0 comments on commit 3279a85

Please sign in to comment.