def matrixToImage(X, shape):
    """Transform a flatten image to a regular image

    Args:
        X (array): Flatten image
        shape (tuple): Original dimension of the image X

    Returns:
        array: Image
    """
    return X.reshape(shape)