Skip to content

Commit

Permalink
Fix: Convert NumPy array to tuple in resize method
Browse files Browse the repository at this point in the history
  • Loading branch information
Q authored and Q committed Aug 25, 2024
1 parent bbad57f commit cf1561f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rapid_latex_ocr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]] = [
Expand Down

0 comments on commit cf1561f

Please sign in to comment.