Skip to content

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #392

Open
@seraph900112

Description

@seraph900112
  File "/root/ZiYuShen/latex_val/.venv/lib/python3.10/site-packages/pix2tex/cli.py", line 115, in __call__
    img = minmax_size(pad(img), self.args.max_dimensions, self.args.min_dimensions)
  File "/root/ZiYuShen/latex_val/.venv/lib/python3.10/site-packages/pix2tex/cli.py", line 47, in minmax_size
    img = img.resize(size.astype(int), Image.BILINEAR)
  File "/root/ZiYuShen/latex_val/.venv/lib/python3.10/site-packages/PIL/Image.py", line 2297, in resize
    if self.size == size and box == (0, 0) + self.size:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

When calling latex_model(img), the above error will occur in some pictures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions