Skip to content

Commit cf1561f

Browse files
QQ
Q
authored and
Q
committed
Fix: Convert NumPy array to tuple in resize method
1 parent bbad57f commit cf1561f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rapid_latex_ocr/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def minmax_size(
7575
ratios = [a / b for a, b in zip(img.size, self.max_dims)]
7676
if any([r > 1 for r in ratios]):
7777
size = np.array(img.size) // max(ratios)
78-
img = img.resize(size.astype(int), Image.BILINEAR)
78+
img = img.resize(tuple(size.astype(int)), Image.BILINEAR)
7979

8080
if self.min_dims is not None:
8181
padded_size: List[Union[int, int]] = [

0 commit comments

Comments
 (0)