Commit d946b57b authored by Bas Nijholt's avatar Bas Nijholt
Browse files

use any

parent 23e68b45
......@@ -238,9 +238,7 @@
" masks = [contour_mask(200, 200, cnt) for cnt in contours]\n",
" segments = [np.array(resized_img)[mask] for mask in masks]\n",
"\n",
" if found_jet := next(\n",
" (True for seg in segments if contains_jet(seg, 0.05)), False\n",
" ):\n",
" if found_jet := any(contains_jet(seg, 0.05) for seg in segments):\n",
" print(f\"Jet found in {paper_id}\")\n",
" jet_papers.append(paper_id)\n",
" break"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment