Skip to content

Commit

Permalink
fix: NaN in reading_order in morph.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MehmedGIT committed Aug 27, 2024
1 parent 224e86f commit a397531
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocrd_cis/ocropy/ocrolib/morph.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def reading_order(seg,rl=False,bt=False):
segmap[1:] = 1
return segmap
def pos(f,l):
return array([f(x) if x else nan for x in l])
return array([f(x) if x else float('nan') for x in l])
ys = pos(sl.ycenter,objects)
yorder = argsort(ys)[::-1 if bt else 1]
groups = [[yorder[0]]]
Expand Down

0 comments on commit a397531

Please sign in to comment.