Skip to content

Commit

Permalink
Merge pull request #28 from BayesLaplace/fix-resize-error
Browse files Browse the repository at this point in the history
fix: Convert NumPy array to tuple in minmax_size resize operation
  • Loading branch information
SWHL committed Aug 26, 2024
2 parents bbad57f + cf1561f commit da45481
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 da45481

Please sign in to comment.