def transformations(self, size, target_size):
        sw, sh = size
        tw, th = target_size
        if not self.expand and not self.force and sw<=tw and sh<=th:
            return []

        if self.force and (sw<=tw or sh<=th):
            if sw*th>sh*tw:
                # crop right and left side
                tw, th = sh*tw//th, sh
            else:
                # crop upper and bottom side
                tw, th = sw, sw*th//tw

        transforms = []
        if sw*th>sh*tw:
            # crop right and left side
            if sh!=th and (sh>th or self.expand):
                w = sw*th//sh
                transforms.append(('resize', (w, th)))
                sw, sh = w, th
            if sw>tw:
                wd = (tw-sw)//2
                transforms.append(('crop', (wd, 0, tw+wd, sh)))
        else:
            # crop upper and bottom side
            if sw!=tw and (sw>tw or self.expand):
                h = sh*tw//sw
                transforms.append(('resize', (tw, h)))
                sw, sh = tw, h
            if sh>th:
                hd = (sh-th)//2
                transforms.append(('crop', (0, hd, sw, th+hd)))
        return transforms
dataset/ETHPy150Open SmartTeleMax/iktomi/iktomi/unstable/utils/image_resizers.py/ResizeCrop.transformations/swapped operands of `-`