def rebuild_feature_image(image, f_pixels):
    shape_changed = f_pixels.shape[1:] != image.shape
    if hasattr(image, 'mask'):
        # original image had a mask. Did the feature generate an image of the
        # same size?
        if shape_changed:
            # feature is of a different size - best we can do is rescale the
            # mask
            mask = image.mask.resize(f_pixels.shape[1:])
        else:
            # feature is same size as input
            mask = image.mask.copy()
        new_image = MaskedImage(f_pixels, mask=mask, copy=False)
    else:
        new_image = Image(f_pixels, copy=False)
    if image.has_landmarks:
        if shape_changed:
            # need to adjust the landmarks
            sf = np.array(image.shape) / np.array(f_pixels.shape[1:])
            new_image.landmarks = NonUniformScale(sf).apply(image.landmarks)
        else:
            new_image.landmarks = image.landmarks
    return new_image
dataset/ETHPy150Open menpo/menpo/menpo/feature/base.py/rebuild_feature_image/swapped operands of `/`