def __init__(self, image_data, copy=True):
        super(Image, self).__init__()
        if not copy:
            if not image_data.flags.c_contiguous:
                image_data = np.array(image_data, copy=True, order='C')
                warn('The copy flag was NOT honoured. A copy HAS been made. '
                     'Please ensure the data you pass is C-contiguous.')
        else:
            image_data = np.array(image_data, copy=True, order='C')

        # Degenerate case whereby we can just put the extra axis
        # on ourselves
        if image_data.ndim == 2:
            # Ensures that the data STAYS C-contiguous
            image_data = image_data.reshape((1,) + image_data.shape)

        if image_data.ndim < 2:
            raise ValueError(
                "Pixel array has to be 2D (implicitly 1 channel, "
                "2D shape) or 3D+ (n_channels, 2D+ shape) "
                " - a {}D array "
                "was provided".format(image_data.ndim))
        self.pixels = image_data
dataset/ETHPy150Open menpo/menpo/menpo/image/base.py/Image.__init__/original