Skip to content

Commit

Permalink
ruff: fix B909 mutation of loop iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jul 19, 2024
1 parent 85f37cd commit b85b709
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/jw_meshtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit b85b709

Please sign in to comment.