Browse Source

Rearrange sorted in RegKB

pull/3/head
troyyyyy GitHub 3 years ago
parent
commit
ce406011bf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      abl/abducer/kb.py

+ 4
- 3
abl/abducer/kb.py View File

@@ -63,9 +63,10 @@ class KBBase(ABC):
part_X, part_Y = zip(*XY_list)
X.extend(part_X)
Y.extend(part_Y)
sorted_XY = sorted(list(zip(Y, X)))
X = [x for y, x in sorted_XY]
Y = [y for y, x in sorted_XY]
if self.max_err != 0:
sorted_XY = sorted(list(zip(Y, X)))
X = [x for y, x in sorted_XY]
Y = [y for y, x in sorted_XY]
return X, Y

@abstractmethod


Loading…
Cancel
Save