ToolPythonBeginner Counting cells with scipy.ndimage: how many are there, and how large? cells = np.where(flagged, markers[iy, ix] + n, labels) # flagged: marker + n (clear of 1 to n), else old label
RecipePythonBeginner Draw a phase portrait of a two-variable ODE system norm = np.where(speed > 0, speed, 1.0) # a node on a fixed point keeps a zero arrow, no 0 / 0