Skip to content

v1.2.0

Choose a tag to compare

@phruut phruut released this 11 Oct 11:24
· 14 commits to main since this release
fix: don't require numpy for bytes OCR (panicked on bare installs)

extract_input probed for an ndarray before checking the object type, and pyo3-numpy panics while fetching the numpy C API capsule when numpy is absent, so ocr(bytes) crashed on a bare install. Probe arrays only when numpy is importable (cached per process), and make return_array=True raise a clean RuntimeError instead of panicking. Regression test runs the no-numpy scenario in a subprocess.

Found by the tag-only ov-download-check job: its bare wheel install has no numpy and the byte-input smoke OCR panicked.