Using scipy.optimize.minimize with a quantized integer range
If the question is, if you can use discrete/integer/categorical design variables in scipy.optimize.minimize, the answer is no. It is mainly focused on gradient-based optimization, and it assumes continues design variables and continuous objective function. You can implement some continuous approximation, or branch-and-bound or similar methods to solve for discrete design variables.
Can I use scipy.optimize.minimize to only restrict its answer to for example 2, 3, 4, 6, 8, 10? Just those values and not float values?