Skip to content

Commit 7c2a410

Browse files
cleanup of Merge docstring
1 parent 376c069 commit 7c2a410

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/user_guide/examples/tutorial_interaction.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,30 +279,30 @@
279279
" i_idx = np.arange(N)\n",
280280
" mutual = has_nn & (nn[nn] == i_idx)\n",
281281
"\n",
282-
" # process each mutual pair only once (i < j)\n",
282+
" # define pairs i and their nearest neighbour j\n",
283283
" pair_mask = mutual & (i_idx < nn)\n",
284284
" pair_i = i_idx[pair_mask]\n",
285285
" pair_j = nn[pair_mask]\n",
286286
"\n",
287287
" if pair_i.size == 0:\n",
288288
" return\n",
289289
"\n",
290-
" # larger = where mass_j >= mass_i -> j else i\n",
290+
" # compute which of the two (i, j) has the largest mass\n",
291291
" mass_i = particles.mass[pair_i]\n",
292292
" mass_j = particles.mass[pair_j]\n",
293293
" larger_idx = np.where(mass_j > mass_i, pair_j, pair_i)\n",
294294
" smaller_idx = np.where(mass_j > mass_i, pair_i, pair_j)\n",
295295
"\n",
296296
" # perform transfer and mark deletions\n",
297-
" # note that we use temporary arrays for indexing because of KernelParticle bug (GH #2143)\n",
297+
" # TODO note that we use temporary arrays for indexing because of KernelParticle bug (GH #2143)\n",
298298
" masses = particles.mass\n",
299299
" states = particles.state\n",
300300
"\n",
301301
" # transfer mass from smaller to larger and mark smaller for deletion\n",
302302
" masses[larger_idx] += particles.mass[smaller_idx]\n",
303303
" states[smaller_idx] = parcels.StatusCode.Delete\n",
304304
"\n",
305-
" # TODO use particle variables directly KernelParticle bug (GH #2143) is fixed\n",
305+
" # TODO use particle variables directly after KernelParticle bug (GH #2143) is fixed\n",
306306
" particles.mass = masses\n",
307307
" particles.state = states"
308308
]

0 commit comments

Comments
 (0)