From cf1561fc691aa3bc21af4fb5a203c654ebf469e2 Mon Sep 17 00:00:00 2001 From: Q Date: Sun, 25 Aug 2024 19:52:54 +0800 Subject: [PATCH] Fix: Convert NumPy array to tuple in resize method --- rapid_latex_ocr/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rapid_latex_ocr/utils.py b/rapid_latex_ocr/utils.py index c06fb70..5e73509 100644 --- a/rapid_latex_ocr/utils.py +++ b/rapid_latex_ocr/utils.py @@ -75,7 +75,7 @@ def minmax_size( ratios = [a / b for a, b in zip(img.size, self.max_dims)] if any([r > 1 for r in ratios]): size = np.array(img.size) // max(ratios) - img = img.resize(size.astype(int), Image.BILINEAR) + img = img.resize(tuple(size.astype(int)), Image.BILINEAR) if self.min_dims is not None: padded_size: List[Union[int, int]] = [