def _create_gradient_image(size, color_from, color_to, rotation):
    # create gradient
    rgb_arrays = [np.linspace(color_from[x], color_to[x], size).astype('uint8') for x in range(3)]
    gradient = np.concatenate(rgb_arrays)

    # extend to 2d
    picture = np.repeat(gradient, size)
    picture.shape = (3, size, size)

    # make image and rotate
    image = PIL.Image.fromarray(picture.T)
    image = image.rotate(rotation)

    return image
Returns a copy of itself. This needs to be implemented so that
dataset/ETHPy150Open NVIDIA/DIGITS/digits/dataset/images/classification/test_imageset_creator.py/_create_gradient_image--crossover with--dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/query/visual.py/VisualQuery.__call__