def METHOD_NAME(self):
    gray_data = empty(shape=(5, 4))
    gray_data[:] = array([0.0, 0.25, 0.5, 0.75, 1.0]).reshape(5, 1)
    self.colormap = DiscreteColorMapper.from_palette_array(gray_data)
    a = array([0, 2, 3])
    b = self.colormap.map_uint8(a)
    self.assertEqual(b.shape, (3, 4))
    self.assertEqual(b.dtype, uint8)
    for i in range(4):
        assert_array_almost_equal(b[:, i], array([0, 128, 192]))