From 488cb96c1d399a802994548d8104696217114cb1 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 13 Oct 2021 12:55:44 +0100 Subject: [PATCH] cpart_wid is just max(lane_shapes.values()) --- src/ieee754/part/layout_experiment.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ieee754/part/layout_experiment.py b/src/ieee754/part/layout_experiment.py index 2e8363ab..335dc41d 100644 --- a/src/ieee754/part/layout_experiment.py +++ b/src/ieee754/part/layout_experiment.py @@ -101,9 +101,8 @@ def layout(elwid, signed, part_counts, lane_shapes=None, fixed_width=None): if not isinstance(lane_shapes, Mapping): lane_shapes = {i: lane_shapes for i in part_counts} # compute a set of partition widths - cpart_wid = [-lane_shapes[i] for i, c in part_counts.items()] - print("cpart_wid", cpart_wid, "part_counts", part_counts) - cpart_wid = -min(cpart_wid) + print("lane_shapes", lane_shapes, "part_counts", part_counts) + cpart_wid = max(lane_shapes.values()) part_count = max(part_counts.values()) # calculate the minumum width required width = cpart_wid * part_count -- 2.30.2