From 75dc391540d021e6d3d44453e33a24a577890c6b Mon Sep 17 00:00:00 2001 From: jan Date: Tue, 10 Mar 2026 00:29:51 -0700 Subject: [PATCH] [pack2d] don't place rejects --- masque/utils/pack2d.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/masque/utils/pack2d.py b/masque/utils/pack2d.py index ce6b006..a99b01e 100644 --- a/masque/utils/pack2d.py +++ b/masque/utils/pack2d.py @@ -236,7 +236,9 @@ def pack_patterns( locations, reject_inds = packer(sizes, containers, presort=presort, allow_rejects=allow_rejects) pat = Pattern() - for pp, oo, loc in zip(patterns, offsets, locations, strict=True): + for ii, (pp, oo, loc) in enumerate(zip(patterns, offsets, locations, strict=True)): + if ii in reject_inds: + continue pat.ref(pp, offset=oo + loc) rejects = [patterns[ii] for ii in reject_inds]