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

Function curate_rows

src/__main__.py:600–607  ·  view source on GitHub ↗
(rows: Set[int], GRID)

Source from the content-addressed store, hash-verified

598
599 # --------------------------------------------------------------------
600 def curate_rows(rows: Set[int], GRID) -> List:
601 rows = list(rows)
602 rows.sort() # sort ascending
603 nrows = [rows[0]]
604 for h in rows[1:]:
605 if h >= nrows[-1] + GRID: # only keep significant differences
606 nrows.append(h)
607 return nrows # curated list of line bottom coordinates
608
609 def process_blocks(blocks: List[Dict], page: pymupdf.Page):
610 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…