mob_morph

Morphing (become) and structural batch-alignment machinery.

Classes

MobMorphMixin

become plus the structural helpers used to align arbitrary Mobs.

Functions

align_part_lists(mine, theirs, *, make_placeholder)[source]

Evenly align two part lists, filling shortfall from the counterpart.

The first occurrence of every original short-side part is retained. Slots which the legacy evenly-spread repeat formula would have filled with a duplicate instead receive make_placeholder(long_side_part, side=...). This handles an empty side as naturally as any other size.

Return type:

tuple[list, list]

linear_sum_assignment(*args, **kwargs)[source]

Import SciPy’s assignment solver only when movement minimization is used.