Farm: Ebenen-Beleg - fehlende Mischung in beiden Armen ist gleich (leere Mischung = kein Feld)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
566ba049c9
commit
b471ec7802
@@ -64,6 +64,7 @@ def misch_zahlen(bb):
|
||||
if not isinstance(m, list): return None
|
||||
return [(x.get("zug"), x.get("anteil")) if isinstance(x, dict) else tuple(x) for x in m]
|
||||
def misch_gleich(a, b):
|
||||
if a is None and b is None: return True # leere Mischung = kein Feld (endstrecke::basis_wert), in beiden Armen gleich
|
||||
if a is None or b is None or len(a) != len(b): return False
|
||||
return all(za == zb and abs(float(pa) - float(pb)) <= 1e-9 * max(1.0, abs(float(pa)), abs(float(pb))) for (za, pa), (zb, pb) in zip(a, b))
|
||||
if any(isinstance(c[i].get("basis"), dict) for i in c):
|
||||
|
||||
Reference in New Issue
Block a user