MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / curate_rows

Function curate_rows

src_classic/__main__.py:596–603  ·  view source on GitHub ↗
(rows: Set[int], GRID)

Source from the content-addressed store, hash-verified

594
595 # --------------------------------------------------------------------
596 def curate_rows(rows: Set[int], GRID) -> List:
597 rows = list(rows)
598 rows.sort() # sort ascending
599 nrows = [rows[0]]
600 for h in rows[1:]:
601 if h >= nrows[-1] + GRID: # only keep significant differences
602 nrows.append(h)
603 return nrows # curated list of line bottom coordinates
604
605 def process_blocks(blocks: List[Dict], page: fitz.Page):
606 rows = set()

Callers 1

page_layoutFunction · 0.70

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…