

def test_to_nRGB_value(self):
    img = to_nRGB(self.I)
    denom = (numpy.sqrt((((50 ** 2) + (100 ** 2)) + (150 ** 2))) / 255.0)
    (r, g, b) = ((50 / denom), (100 / denom), (150 / denom))
    assert (img[:, :, 0] == int(r)).all()
    assert (img[:, :, 1] == int(g)).all()
    assert (img[:, :, 2] == int(b)).all()

dataset/ETHPy150Open belltailjp/selective_search_py/test_color_space.py TestColorSpace.test_to_nRGB_value/original