scipy.optimize.brute

scipy.optimize.brute(func, ranges, args=(), Ns=20, full_output=0, finish=<function fmin at 0x4d4a9b0>)

Minimize a function over a given range by brute force.

Parameters :

func : callable f(x,*args)

Objective function to be minimized.

ranges : tuple

Each element is a tuple of parameters or a slice object to be handed to numpy.mgrid.

args : tuple

Extra arguments passed to function.

Ns : int

Default number of samples, if those are not provided.

full_output : bool

If True, return the evaluation grid.

Returns :

x0 : ndarray

Value of arguments to func, giving minimum over the grid.

fval : int

Function value at minimum.

grid : tuple

Representation of the evaluation grid. It has the same length as x0.

Jout : ndarray

Function values over grid: Jout = func(*grid).

Notes

Find the minimum of a function evaluated on a grid given by the tuple ranges.

Previous topic

scipy.optimize.anneal

Next topic

scipy.optimize.fminbound

This Page