You can use the differential_evolution function from SciPy for global optimization.
Here's an example:
from scipy.optimize import differential_evolution
# Define the objective function
def objective(x):
return (x[0] - 2) ** 2 + (x[1] - 3) ** 2
# Define the bounds for the search space
bounds = [(0, 5), (0, 5)]
# Perform global optimization
result = differential_evolution(objective, bounds)
print("Global minimum value:", result.fun)
print("Optimal parameters:", result.x)