Remove unneeded conversion from int to float.
This commit is contained in:
parent
6a3f8b3143
commit
00508d1919
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ class Line(PageObject):
|
||||||
@cached_property
|
@cached_property
|
||||||
def baseline(self):
|
def baseline(self):
|
||||||
"""Detect baseline height, relative to the top."""
|
"""Detect baseline height, relative to the top."""
|
||||||
bitmap = self.image.bitmap.astype(np.float)
|
bitmap = self.image.bitmap
|
||||||
histogram = bitmap.sum(axis=1)
|
histogram = bitmap.sum(axis=1)
|
||||||
gradient = list(filters.correlate1d(histogram, [-1, 1], axis=0, mode='constant'))
|
gradient = list(filters.correlate1d(histogram, [-1, 1], axis=0, mode='constant'))
|
||||||
gradient[0] = histogram[0]
|
gradient[0] = histogram[0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue