From 75b7f0a56780751faae0a8e7aa6e359b6cd205d9 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 14 Oct 2021 20:27:42 -0700 Subject: [PATCH] sort dpoints keys --- src/ieee754/part/layout_experiment.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ieee754/part/layout_experiment.py b/src/ieee754/part/layout_experiment.py index 88f058cd..65fe1425 100644 --- a/src/ieee754/part/layout_experiment.py +++ b/src/ieee754/part/layout_experiment.py @@ -152,10 +152,13 @@ def layout(elwid, vec_el_counts, lane_shapes=None, fixed_width=None): # do not need the breakpoints at the very start or the very end dpoints.pop(0, None) dpoints.pop(width, None) + + # sort dpoints keys + dpoints = dict(sorted(dpoints.items(), key=lambda i: i[0])) + plist = list(dpoints.keys()) - plist.sort() print("dpoints") - pprint(dict(dpoints)) + pprint(dpoints) # second stage, add (map to) the elwidth==i expressions. # TODO: use nmutil.treereduce? -- 2.30.2