def _rectify(self, square):

        square = square.reshape((4, 2))
        square_new = np.zeros((4, 2), dtype=np.float32)

        add = square.sum(1)
        square_new[0] = square[np.argmin(add)]
        square_new[2] = square[np.argmax(add)]

        diff = np.diff(square, axis=1)
        square_new[1] = square[np.argmin(diff)]
        square_new[3] = square[np.argmax(diff)]

        return square_new
Returns whether or not this barrier has pending work.
dataset/ETHPy150Open GoogleCloudPlatform/appengine-opencv-sudoku-python/sudoku_image_parser.py/SudokuImageParser._rectify--crossover with--dataset/ETHPy150Open bslatkin/dpxdt/dpxdt/client/workers.py/Barrier.outstanding