Fix bug in hierarchical_merge function (#4006)

### What problem does this PR solve?

Fix hierarchical_merge function. From idx vs. actual value to actual
value vs. actual value.
Related issue #4003 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: luopan <luopan@example.com>
This commit is contained in:
Luo Pan 2024-12-13 08:50:58 +08:00 committed by GitHub
parent 7559bbd46d
commit 68d46b2a1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -466,7 +466,7 @@ def hierarchical_merge(bull, sections, depth):
jj = binary_search(levels[ii], j)
if jj < 0:
continue
if jj > cks[-1][-1]:
if levels[ii][jj] > cks[-1][-1]:
cks[-1].pop(-1)
cks[-1].append(levels[ii][jj])
for ii in cks[-1]: