Module Expr Str ImportFrom alias Import alias Import alias identifier ImportFrom alias alias alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias ImportFrom alias ImportFrom alias Import alias FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num Num Num Num Num ListLoad Num Num Num Num Num Num Num Num ListLoad Num Num Num Num Num Num Num Num attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Num Num Assign NameStore BinOpMult NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad Call NameLoad AttributeLoad NameLoad attr ExtSlice Slice Num Slice Num Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr Num Num Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str ExtSlice Slice Num Slice Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr Num Num attr AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Call NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr With Call NameLoad ListLoad Str body Assign NameStore Call NameLoad Call NameLoad Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias alias Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore Call SubscriptLoad NameLoad Index NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num attr TupleLoad Num Num Num attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad Num Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Num Assert SubscriptLoad AttributeLoad Call NameLoad NameLoad attr Index Str Assert SubscriptLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad ExtSlice Slice Num Slice Num attr Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Num Assert CompareEq AttributeLoad Call NameLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num For NameStore ListLoad Str Str Str Str body For NameStore ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad keyword Num For NameStore ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad Str keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num For NameStore ListLoad Str Str Str Str body For NameStore ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr keyword Num For NameStore ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Str AttributeLoad NameLoad attr keyword Num TryExcept body Assign NameStore Call NameLoad NameLoad Str Str handlers ExceptHandler type NameLoad body Pass TryExcept body Assign NameStore Call NameLoad NameLoad Str Str handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Num Num Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num For NameStore ListLoad Str Str Str Str body For NameStore ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad keyword Num For NameStore ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad Str keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num For NameStore ListLoad Str Str Str Str body For NameStore ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr keyword Num For NameStore ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Str AttributeLoad NameLoad attr keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Num Num Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Num Assign SubscriptStore NameLoad Index Num ListLoad Num Num Num Assign SubscriptStore NameLoad Index Num ListLoad Num Num Num Assign SubscriptStore NameLoad Index Num ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num ListLoad ListLoad Num Num Num Expr Call NameLoad Call NameLoad NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Call AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad For NameStore ListLoad Num Num Num body Assign SubscriptStore NameLoad ExtSlice Slice Slice Index Num NameLoad With Call NameLoad ListLoad Str body Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad ExtSlice Index NameLoad Index NameLoad Slice Expr Call NameLoad NameLoad SubscriptLoad NameLoad ExtSlice Index Num Index Num Slice decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad ExtSlice Index NameLoad Slice Expr Call NameLoad NameLoad SubscriptLoad NameLoad ExtSlice Index Num Slice decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad ExtSlice Index NameLoad Index NameLoad Index NameLoad Slice Expr Call NameLoad NameLoad SubscriptLoad NameLoad ExtSlice Index Num Index Num Index Num Slice decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Num Slice Num Slice Return SubscriptLoad Call NameLoad NameLoad ExtSlice Index Num Index Num Slice decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Expr Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Assign NameStore Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad NameLoad ExtSlice Ellipsis Index Num NameLoad Expr Call NameLoad SubscriptLoad NameLoad ExtSlice Index Num Index Num Slice ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num Expr Call NameLoad SubscriptLoad NameLoad ExtSlice Ellipsis Index Num NameLoad Expr Call NameLoad SubscriptLoad NameLoad ExtSlice Index Num Index Num Slice ListLoad Num Num Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Num Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword NameLoad attr TupleLoad Num Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword NameLoad attr TupleLoad Num Num Num Expr Call NameLoad SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num keyword NameLoad Index TupleLoad Num Num Num Num Expr Call NameLoad SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num keyword AttributeLoad NameLoad attr keyword NameLoad Index TupleLoad Num Num Num Num decorator_list If CompareEq NameLoad Str body ImportFrom alias Expr Call NameLoad
N/A N/A Tests for color conversion functions.

Authors
-------
- the rgb2hsv test was written by Nicolas Pinto, 2009
- other tests written by Ralf Gommers, 2009

:license: modified BSD
 __future__ division N/A os.path N/A numpy np numpy.testing assert_equal assert_almost_equal assert_array_almost_equal assert_raises TestCase skimage img_as_float img_as_ubyte skimage.io imread skimage.color rgb2hsv hsv2rgb rgb2xyz xyz2rgb rgb2hed hed2rgb separate_stains combine_stains rgb2rgbcie rgbcie2rgb convert_colorspace rgb2grey gray2rgb xyz2lab lab2xyz lab2rgb rgb2lab xyz2luv luv2xyz luv2rgb rgb2luv lab2lch lch2lab guess_spatial_dimensions skimage data_dir skimage._shared._warnings expected_warnings N/A colorsys test_guess_spatial_dimensions N/A N/A N/A N/A N/A im1 N/A N/A np zeros N/A 5 5 N/A im2 N/A N/A np zeros N/A 5 5 5 N/A im3 N/A N/A np zeros N/A 5 5 3 N/A im4 N/A N/A np zeros N/A 5 5 5 3 N/A im5 N/A N/A np zeros N/A 5 N/A N/A assert_equal N/A guess_spatial_dimensions im1 2 N/A N/A assert_equal N/A guess_spatial_dimensions im2 3 N/A N/A assert_equal N/A guess_spatial_dimensions im3 None N/A N/A assert_equal N/A guess_spatial_dimensions im4 3 N/A N/A assert_raises ValueError guess_spatial_dimensions im5 N/A TestColorconv N/A TestCase N/A N/A img_rgb N/A imread N/A N/A N/A os path join data_dir color.png N/A img_grayscale N/A imread N/A N/A N/A os path join data_dir camera.png N/A colbars N/A N/A N/A N/A np array N/A N/A 1 1 0 0 1 1 0 0 N/A 1 1 1 1 0 0 0 0 N/A 1 0 1 0 1 0 1 0 astype N/A np float N/A colbars_array N/A N/A np swapaxes N/A N/A colbars reshape 3 4 2 0 2 N/A colbars_point75 N/A colbars 0.75 N/A colbars_point75_array N/A N/A np swapaxes N/A N/A colbars_point75 reshape 3 4 2 0 2 N/A xyz_array N/A N/A np array N/A N/A N/A 0.4124 0.2126 0.0193 N/A N/A 0 0 0 N/A N/A 0.9505 1.0 1.089 N/A N/A 0.1805 0.0722 0.9505 N/A N/A 0.07719 0.15438 0.02573 N/A lab_array N/A N/A np array N/A N/A N/A 53.233 80.109 67.22 N/A N/A 0.0 0.0 0.0 N/A N/A 100.0 0.005 -0.01 N/A N/A 32.303 79.197 -107.864 N/A N/A 46.229 -51.7 49.898 N/A luv_array N/A N/A np array N/A N/A N/A 53.233 175.053 37.751 N/A N/A 0.0 0.0 0.0 N/A N/A 100.0 0.001 -0.017 N/A N/A 32.303 -9.4 -130.358 N/A N/A 46.228 -43.774 56.589 test_rgb2hsv_conversion N/A N/A self N/A N/A N/A rgb N/A N/A img_as_float N/A self img_rgb N/A N/A 16 N/A 16 N/A hsv N/A N/A N/A rgb2hsv rgb reshape -1 3 N/A gt N/A N/A np array N/A N/A N/A colorsys rgb_to_hsv N/A pt N/A 0 N/A pt N/A 1 N/A pt N/A 2 N/A pt N/A N/A rgb reshape -1 3 N/A N/A assert_almost_equal hsv gt N/A test_rgb2hsv_error_grayscale N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError rgb2hsv N/A self img_grayscale N/A test_rgb2hsv_error_one_element N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError rgb2hsv N/A N/A self img_rgb N/A N/A 0 0 N/A test_hsv2rgb_conversion N/A N/A self N/A N/A N/A rgb N/A N/A N/A N/A self img_rgb astype float32 N/A N/A 16 N/A 16 N/A hsv N/A N/A N/A N/A np array N/A N/A N/A colorsys rgb_to_hsv N/A pt N/A 0 N/A pt N/A 1 N/A pt N/A 2 N/A pt N/A N/A rgb reshape -1 3 reshape N/A rgb shape N/A N/A assert_almost_equal rgb N/A hsv2rgb hsv decimal 4 N/A test_hsv2rgb_error_grayscale N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError hsv2rgb N/A self img_grayscale N/A test_hsv2rgb_error_one_element N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError hsv2rgb N/A N/A self img_rgb N/A N/A 0 0 N/A test_rgb2xyz_conversion N/A N/A self N/A N/A N/A gt N/A N/A np array N/A N/A N/A 0.950456 1.0 1.088754 N/A 0.538003 0.787329 1.06942 N/A 0.592876 0.28484 0.969561 N/A 0.180423 0.072169 0.950227 N/A N/A 0.770033 0.927831 0.138527 N/A 0.35758 0.71516 0.119193 N/A 0.412453 0.212671 0.019334 N/A 0.0 0.0 0.0 N/A N/A assert_almost_equal N/A rgb2xyz N/A self colbars_array gt N/A test_rgb2xyz_error_grayscale N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError rgb2xyz N/A self img_grayscale N/A test_rgb2xyz_error_one_element N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError rgb2xyz N/A N/A self img_rgb N/A N/A 0 0 N/A test_xyz2rgb_conversion N/A N/A self N/A N/A N/A N/A assert_almost_equal N/A xyz2rgb N/A rgb2xyz N/A self colbars_array N/A self colbars_array N/A test_xyz_rgb_roundtrip N/A N/A self N/A N/A N/A img_rgb N/A img_as_float N/A self img_rgb N/A N/A assert_array_almost_equal N/A xyz2rgb N/A rgb2xyz img_rgb img_rgb N/A test_hed_rgb_roundtrip N/A N/A self N/A N/A N/A img_rgb N/A img_as_ubyte N/A self img_rgb N/A N/A expected_warnings N/A precision loss N/A N/A new N/A img_as_ubyte N/A hed2rgb N/A rgb2hed img_rgb N/A N/A assert_equal new img_rgb N/A test_hed_rgb_float_roundtrip N/A N/A self N/A N/A N/A img_rgb N/A img_as_float N/A self img_rgb N/A N/A assert_array_almost_equal N/A hed2rgb N/A rgb2hed img_rgb img_rgb N/A test_hdx_rgb_roundtrip N/A N/A self N/A N/A skimage.color.colorconv hdx_from_rgb rgb_from_hdx N/A img_rgb N/A self img_rgb N/A conv N/A combine_stains N/A separate_stains img_rgb hdx_from_rgb rgb_from_hdx N/A N/A assert_equal N/A img_as_ubyte conv img_rgb N/A test_hdx_rgb_roundtrip N/A N/A self N/A N/A skimage.color.colorconv hdx_from_rgb rgb_from_hdx N/A img_rgb N/A img_as_float N/A self img_rgb N/A conv N/A combine_stains N/A separate_stains img_rgb hdx_from_rgb rgb_from_hdx N/A N/A assert_array_almost_equal conv img_rgb N/A test_rgb2rgbcie_conversion N/A N/A self N/A N/A N/A gt N/A N/A np array N/A N/A N/A 0.1488856 0.18288098 0.19277574 N/A 0.01163224 0.16649536 0.18948516 N/A 0.12259182 0.03308008 0.17298223 N/A -0.01466154 0.01669446 0.16969164 N/A N/A 0.16354714 0.16618652 0.0230841 N/A 0.02629378 0.1498009 0.01979351 N/A 0.13725336 0.01638562 0.00329059 N/A 0.0 0.0 0.0 N/A N/A assert_almost_equal N/A rgb2rgbcie N/A self colbars_array gt N/A test_rgbcie2rgb_conversion N/A N/A self N/A N/A N/A N/A assert_almost_equal N/A rgbcie2rgb N/A rgb2rgbcie N/A self colbars_array N/A self colbars_array N/A test_convert_colorspace N/A N/A self N/A N/A N/A colspaces N/A HSV RGB CIE XYZ N/A colfuncs_from N/A hsv2rgb rgbcie2rgb xyz2rgb N/A colfuncs_to N/A rgb2hsv rgb2rgbcie rgb2xyz N/A N/A assert_almost_equal N/A convert_colorspace N/A self colbars_array RGB RGB N/A self colbars_array N/A N/A i space N/A enumerate colspaces N/A N/A gt N/A N/A colfuncs_from N/A i N/A self colbars_array N/A N/A assert_almost_equal N/A convert_colorspace N/A self colbars_array space RGB gt N/A gt N/A N/A colfuncs_to N/A i N/A self colbars_array N/A N/A assert_almost_equal N/A convert_colorspace N/A self colbars_array RGB space gt N/A N/A N/A self assertRaises ValueError convert_colorspace N/A self colbars_array nokey XYZ N/A N/A N/A self assertRaises ValueError convert_colorspace N/A self colbars_array RGB nokey N/A test_rgb2grey N/A N/A self N/A N/A N/A x N/A N/A N/A N/A N/A N/A np array N/A 1 1 1 reshape N/A 1 1 3 astype N/A np float N/A g N/A rgb2grey x N/A N/A assert_array_almost_equal g 1 N/A N/A assert_equal N/A g shape N/A 1 1 N/A test_rgb2grey_contiguous N/A N/A self N/A N/A N/A x N/A N/A N/A np random rand 10 10 3 N/A N/A N/A N/A rgb2grey x flags N/A C_CONTIGUOUS N/A N/A N/A N/A rgb2grey N/A x N/A N/A 5 N/A 5 flags N/A C_CONTIGUOUS N/A test_rgb2grey_alpha N/A N/A self N/A N/A N/A x N/A N/A N/A np random rand 10 10 4 N/A N/A N/A N/A rgb2grey x ndim 2 N/A test_rgb2grey_on_grey N/A N/A self N/A N/A N/A N/A rgb2grey N/A N/A N/A np random rand 5 5 N/A test_xyz2lab N/A N/A self N/A N/A N/A N/A assert_array_almost_equal N/A xyz2lab N/A self xyz_array N/A self lab_array decimal 3 N/A I N/A d50 d55 d65 d75 N/A N/A obs N/A 2 10 N/A N/A fname N/A N/A lab_array_{0}_{1}.npy format I obs N/A lab_array_I_obs N/A N/A np load N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ data fname N/A N/A assert_array_almost_equal lab_array_I_obs N/A xyz2lab N/A self xyz_array I obs decimal 2 N/A I N/A a e N/A N/A fname N/A N/A lab_array_{0}_2.npy format I N/A lab_array_I_obs N/A N/A np load N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ data fname N/A N/A assert_array_almost_equal lab_array_I_obs N/A xyz2lab N/A self xyz_array I 2 decimal 2 N/A test_lab2xyz N/A N/A self N/A N/A N/A N/A assert_array_almost_equal N/A lab2xyz N/A self lab_array N/A self xyz_array decimal 3 N/A I N/A d50 d55 d65 d75 N/A N/A obs N/A 2 10 N/A N/A fname N/A N/A lab_array_{0}_{1}.npy format I obs N/A lab_array_I_obs N/A N/A np load N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ data fname N/A N/A assert_array_almost_equal N/A lab2xyz lab_array_I_obs I obs N/A self xyz_array decimal 3 N/A I N/A a e N/A N/A fname N/A N/A lab_array_{0}_2.npy format I obs N/A lab_array_I_obs N/A N/A np load N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ data fname N/A N/A assert_array_almost_equal N/A lab2xyz lab_array_I_obs I 2 N/A self xyz_array decimal 3 N/A N/A N/A xs N/A lab2xyz lab_array_I_obs NaI 2 N/A N/A N/A ValueError N/A N/A N/A N/A N/A xs N/A lab2xyz lab_array_I_obs d50 42 N/A N/A N/A ValueError N/A N/A N/A test_rgb2lab_brucelindbloom N/A N/A self N/A N/A N/A 
        Test the RGB->Lab conversion by comparing to the calculator on the
        authoritative Bruce Lindbloom
        [website](http://brucelindbloom.com/index.html?ColorCalculator.html).
         N/A gt_for_colbars N/A N/A N/A np array N/A N/A 100 0 0 N/A 97.1393 -21.5537 94.478 N/A 91.1132 -48.0875 -14.1312 N/A 87.7347 -86.1827 83.1793 N/A 60.3242 98.2343 -60.8249 N/A 53.2408 80.0925 67.2032 N/A 32.297 79.1875 -107.8602 N/A 0 0 0 T N/A gt_array N/A N/A np swapaxes N/A N/A gt_for_colbars reshape 3 4 2 0 2 N/A N/A assert_array_almost_equal N/A rgb2lab N/A self colbars_array gt_array decimal 2 N/A test_lab_rgb_roundtrip N/A N/A self N/A N/A N/A img_rgb N/A img_as_float N/A self img_rgb N/A N/A assert_array_almost_equal N/A lab2rgb N/A rgb2lab img_rgb img_rgb N/A test_xyz2luv N/A N/A self N/A N/A N/A N/A assert_array_almost_equal N/A xyz2luv N/A self xyz_array N/A self luv_array decimal 3 N/A I N/A d50 d55 d65 d75 N/A N/A obs N/A 2 10 N/A N/A fname N/A N/A luv_array_{0}_{1}.npy format I obs N/A luv_array_I_obs N/A N/A np load N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ data fname N/A N/A assert_array_almost_equal luv_array_I_obs N/A xyz2luv N/A self xyz_array I obs decimal 2 N/A I N/A a e N/A N/A fname N/A N/A luv_array_{0}_2.npy format I N/A luv_array_I_obs N/A N/A np load N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ data fname N/A N/A assert_array_almost_equal luv_array_I_obs N/A xyz2luv N/A self xyz_array I 2 decimal 2 N/A test_luv2xyz N/A N/A self N/A N/A N/A N/A assert_array_almost_equal N/A luv2xyz N/A self luv_array N/A self xyz_array decimal 3 N/A I N/A d50 d55 d65 d75 N/A N/A obs N/A 2 10 N/A N/A fname N/A N/A luv_array_{0}_{1}.npy format I obs N/A luv_array_I_obs N/A N/A np load N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ data fname N/A N/A assert_array_almost_equal N/A luv2xyz luv_array_I_obs I obs N/A self xyz_array decimal 3 N/A I N/A a e N/A N/A fname N/A N/A luv_array_{0}_2.npy format I obs N/A luv_array_I_obs N/A N/A np load N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ data fname N/A N/A assert_array_almost_equal N/A luv2xyz luv_array_I_obs I 2 N/A self xyz_array decimal 3 N/A test_rgb2luv_brucelindbloom N/A N/A self N/A N/A N/A 
        Test the RGB->Lab conversion by comparing to the calculator on the
        authoritative Bruce Lindbloom
        [website](http://brucelindbloom.com/index.html?ColorCalculator.html).
         N/A gt_for_colbars N/A N/A N/A np array N/A N/A 100 0 0 N/A 97.1393 7.7056 106.7866 N/A 91.1132 -70.4773 -15.2042 N/A 87.7347 -83.0776 107.3985 N/A 60.3242 84.0714 -108.6834 N/A 53.2408 175.0151 37.7564 N/A 32.297 -9.4054 -130.3423 N/A 0 0 0 T N/A gt_array N/A N/A np swapaxes N/A N/A gt_for_colbars reshape 3 4 2 0 2 N/A N/A assert_array_almost_equal N/A rgb2luv N/A self colbars_array gt_array decimal 2 N/A test_luv_rgb_roundtrip N/A N/A self N/A N/A N/A img_rgb N/A img_as_float N/A self img_rgb N/A N/A assert_array_almost_equal N/A luv2rgb N/A rgb2luv img_rgb img_rgb N/A test_lab_rgb_outlier N/A N/A self N/A N/A N/A lab_array N/A N/A np ones N/A 3 1 3 N/A N/A lab_array N/A 0 N/A 50 -12 85 N/A N/A lab_array N/A 1 N/A 50 12 -85 N/A N/A lab_array N/A 2 N/A 90 -4 -47 N/A rgb_array N/A N/A np array N/A N/A N/A 0.501 0.481 0 N/A N/A 0 0.482 1.0 N/A N/A 0.578 0.914 1.0 N/A N/A assert_almost_equal N/A lab2rgb lab_array rgb_array decimal 3 N/A test_lab_full_gamut N/A N/A self N/A N/A N/A N/A a b N/A N/A np meshgrid N/A N/A np arange -100 100 N/A N/A np arange -100 100 N/A L N/A N/A np ones N/A a shape N/A lab N/A N/A np dstack N/A L a b N/A value N/A 0 10 20 N/A N/A N/A lab N/A N/A N/A N/A 0 value N/A N/A expected_warnings N/A Color data out of range N/A N/A N/A lab2xyz lab N/A test_lab_lch_roundtrip N/A N/A self N/A N/A N/A rgb N/A img_as_float N/A self img_rgb N/A lab N/A rgb2lab rgb N/A lab2 N/A lch2lab N/A lab2lch lab N/A N/A assert_array_almost_equal lab2 lab N/A test_rgb_lch_roundtrip N/A N/A self N/A N/A N/A rgb N/A img_as_float N/A self img_rgb N/A lab N/A rgb2lab rgb N/A lch N/A lab2lch lab N/A lab2 N/A lch2lab lch N/A rgb2 N/A lab2rgb lab2 N/A N/A assert_array_almost_equal rgb rgb2 N/A test_lab_lch_0d N/A N/A self N/A N/A N/A lab0 N/A N/A self _get_lab0 N/A lch0 N/A lab2lch lab0 N/A lch2 N/A lab2lch N/A lab0 N/A N/A None N/A None N/A N/A N/A assert_array_almost_equal lch0 N/A lch2 N/A N/A 0 N/A 0 N/A N/A test_lab_lch_1d N/A N/A self N/A N/A N/A lab0 N/A N/A self _get_lab0 N/A lch0 N/A lab2lch lab0 N/A lch1 N/A lab2lch N/A lab0 N/A N/A None N/A N/A N/A assert_array_almost_equal lch0 N/A lch1 N/A N/A 0 N/A N/A test_lab_lch_3d N/A N/A self N/A N/A N/A lab0 N/A N/A self _get_lab0 N/A lch0 N/A lab2lch lab0 N/A lch3 N/A lab2lch N/A lab0 N/A N/A None N/A None N/A None N/A N/A N/A assert_array_almost_equal lch0 N/A lch3 N/A N/A 0 N/A 0 N/A 0 N/A N/A _get_lab0 N/A N/A self N/A N/A N/A rgb N/A img_as_float N/A N/A self img_rgb N/A N/A 1 N/A 1 N/A N/A N/A N/A rgb2lab rgb N/A N/A 0 N/A 0 N/A N/A N/A test_gray2rgb N/A N/A N/A N/A N/A x N/A N/A np array N/A 0 0.5 1 N/A N/A assert_raises ValueError gray2rgb x N/A x N/A N/A x reshape N/A 3 1 N/A y N/A gray2rgb x N/A N/A assert_equal N/A y shape N/A 3 1 3 N/A N/A assert_equal N/A y dtype N/A x dtype N/A N/A assert_equal N/A y N/A N/A N/A 0 x N/A N/A assert_equal N/A y N/A N/A 0 N/A 0 N/A N/A 0 0 0 N/A x N/A N/A np array N/A N/A 0 128 255 dtype N/A np uint8 N/A z N/A gray2rgb x N/A N/A assert_equal N/A z shape N/A 1 3 3 N/A N/A assert_equal N/A z N/A N/A N/A 0 x N/A N/A assert_equal N/A z N/A N/A 0 N/A 1 N/A N/A 128 128 128 N/A test_gray2rgb_rgb N/A N/A N/A N/A N/A x N/A N/A N/A np random rand 5 5 4 N/A y N/A gray2rgb x N/A N/A assert_equal x y N/A test_gray2rgb_alpha N/A N/A N/A N/A N/A x N/A N/A N/A np random random N/A 5 5 4 N/A N/A assert_equal N/A N/A gray2rgb x alpha None shape N/A 5 5 4 N/A N/A assert_equal N/A N/A gray2rgb x alpha False shape N/A 5 5 3 N/A N/A assert_equal N/A N/A gray2rgb x alpha True shape N/A 5 5 4 N/A x N/A N/A N/A np random random N/A 5 5 3 N/A N/A assert_equal N/A N/A gray2rgb x alpha None shape N/A 5 5 3 N/A N/A assert_equal N/A N/A gray2rgb x alpha False shape N/A 5 5 3 N/A N/A assert_equal N/A N/A gray2rgb x alpha True shape N/A 5 5 4 N/A N/A assert_equal N/A N/A gray2rgb N/A N/A np array N/A N/A 1 2 N/A 3 4.0 alpha True N/A N/A 0 0 3 1 N/A N/A assert_equal N/A N/A gray2rgb N/A N/A np array N/A N/A 1 2 N/A 3 4 dtype N/A np uint8 alpha True N/A N/A 0 0 3 255 N/A N/A N/A __name__ __main__ N/A numpy.testing run_module_suite N/A N/A run_module_suite