Add atol and fix variable declaration
parent
9b5782f9ba
commit
9b67b271e4
|
|
@ -55,7 +55,7 @@ class TextEdges(object):
|
|||
|
||||
def find(self, x_coord, align):
|
||||
for i, te in enumerate(self._textedges[align]):
|
||||
if np.isclose(te.x, x_coord):
|
||||
if np.isclose(te.x, x_coord, atol=0.5):
|
||||
return i
|
||||
return None
|
||||
|
||||
|
|
@ -134,8 +134,8 @@ class TextEdges(object):
|
|||
# drawback: table areas that have paragraphs to their sides
|
||||
# will include the paragraphs too.
|
||||
for tl in textlines:
|
||||
for area in table_areas:
|
||||
found = None
|
||||
for area in table_areas:
|
||||
# check for overlap
|
||||
if tl.y0 >= area[1] and tl.y1 <= area[3]:
|
||||
found = area
|
||||
|
|
|
|||
Loading…
Reference in New Issue