dedup dpoints
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 15 Oct 2021 03:20:43 +0000 (20:20 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 15 Oct 2021 03:20:43 +0000 (20:20 -0700)
src/ieee754/part/layout_experiment.py

index 24e9aa5b7763c8646b4517f9aafcde45225ef896..4fabaa5fc762d0607f29435c02f870d6c45aa8a2 100644 (file)
@@ -145,6 +145,10 @@ def layout(elwid, vec_el_counts, lane_shapes=None, fixed_width=None):
             add_p("end  ", start, start * part_wid +
                   lane_shapes[i])  # end lane
 
+    # deduplicate dpoints lists
+    for k in dpoints.keys():
+        dpoints[k] = list({i: None for i in dpoints[k]}.keys())
+
     # do not need the breakpoints at the very start or the very end
     dpoints.pop(0, None)
     if fixed_width is not None: