#NEWLINE# def _resize( self , square , size ) : #NEWLINE# #INDENT# 'Resize the sudoku puzzle to specified dimension.\n\n        Args:\n            square: The cv2.Mat image to resize.\n            size: The integer value to resize the image to.\n\n        Returns:\n            The resized numpy.ndarray of the image.\n        ' #NEWLINE# approx = self . _rectify ( square ) #NEWLINE# h = np . array ( [ [ 0 , 0 ] , [ ( size - 1 ) , 0 ] , [ ( size - 1 ) , ( size - 1 ) ] , [ 0 , ( size - 1 ) ] ] , np . float32 ) #NEWLINE# tranformed_image = cv2 . getPerspectiveTransform ( approx , h ) #NEWLINE# resized_image = cv2 . warpPerspective ( self . image , tranformed_image , ( size , size ) ) #NEWLINE# return resized_image