Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

Commit c739f94

Browse files
arnocandelbosd
authored andcommitted
Speedup as in camelot-dev#161
1 parent 91f9c4b commit c739f94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

camelot/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def update_coords(self, x, y0, edge_tol=50):
6060
"""Updates the text edge's x and bottom y coordinates and sets
6161
the is_valid attribute.
6262
"""
63-
if np.isclose(self.y0, y0, atol=edge_tol):
63+
if math.isclose(self.y0, y0, atol=edge_tol):
6464
self.x = (self.intersections * self.x + x) / float(self.intersections + 1)
6565
self.y0 = y0
6666
self.intersections += 1
@@ -96,7 +96,7 @@ def find(self, x_coord, align):
9696
the specified x coordinate and alignment.
9797
"""
9898
for i, te in enumerate(self._textedges[align]):
99-
if np.isclose(te.x, x_coord, atol=0.5):
99+
if math.isclose(te.x, x_coord, atol=0.5):
100100
return i
101101
return None
102102

0 commit comments

Comments
 (0)