ToolPythonBeginner Counting cells with scipy.ndimage: how many are there, and how large? _, cells = np.unique(cells, return_inverse=True) # renumber without gaps; 0 stays 0, shape stays
ToolPythonBeginner Minimization with scipy.optimize.minimize: the shape of a seven-atom cluster for E, count in zip(*np.unique(energies.round(3), return_counts=True)):print(f"the other {rest.sum()} end at", ", ".join(f"{E + 0.0:.3f}" for E in np.unique(E_raw[rest].round(3))), "ε")