We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
inplace
1 parent 6651da5 commit 87e5e72Copy full SHA for 87e5e72
docs/example/deep_layout_parsing/index.rst
@@ -118,10 +118,10 @@ Finally sort the text regions and assign ids:
118
left_interval = lp.Interval(0, w/2*1.05, axis='x').put_on_canvas(image)
119
120
left_blocks = text_blocks.filter_by(left_interval, center=True)
121
- left_blocks.sort(key = lambda b:b.coordinates[1])
+ left_blocks.sort(key = lambda b:b.coordinates[1], inplace=True)
122
123
right_blocks = [b for b in text_blocks if b not in left_blocks]
124
- right_blocks.sort(key = lambda b:b.coordinates[1])
+ right_blocks.sort(key = lambda b:b.coordinates[1], inplace=True)
125
126
# And finally combine the two list and add the index
127
# according to the order
0 commit comments