This is documentation for an old release of SciPy (version 0.7.). Read this page Search for this page in the documentation of the latest stable release (version 1.15.1).
scipy.optimize.brute
-
scipy.optimize.brute(func, ranges, args=(), Ns=20, full_output=0, finish=<function fmin at 0x55f20c8>)
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, fval, {grid, Jout})
- 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.
|