From b85b7094e010589cd9fb420de9851f0ab36576d6 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 19 Jul 2024 09:50:34 +0300 Subject: [PATCH] ruff: fix B909 mutation of loop iterable --- examples/jw_meshtools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/jw_meshtools.py b/examples/jw_meshtools.py index 6ad7c37..e023f8b 100644 --- a/examples/jw_meshtools.py +++ b/examples/jw_meshtools.py @@ -375,13 +375,16 @@ def ConnectMesh(p1, t1, b1, p2, t2, b2, epsilon=1e-8): id_nodes = [] for seg in b1: X = p1[seg[0], :] + bb2_tmp = bb2.copy() for i, node2 in enumerate(bb2): Y = p2[node2, :] delta = np.sum((X - Y) ** 2) if delta < eps: id_nodes += [(seg[0], node2)] # print(X,Y) - bb2.pop(i) + bb2_tmp.pop(i) + + bb2 = bb2_tmp # make list with all mesh 2 nodes for renumbering node2_table = np.arange(len(p2))