asa047, a Python code which minimizes a scalar function of several variables using the Nelder-Mead algorithm, by R ONeill.

ASA047 is Applied Statistics Algorithm 47.


The computer code and data files described and made available on this web page are distributed under the MIT license


asa047 is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.


Original FORTRAN77 version by R ONeill; Python version by John Burkardt.

Relatd programs and data:

compass_search, a Python code which seeks the minimizer of a scalar function of several variables using compass search, a direct search algorithm that does not use derivatives.

toms178, a Python code which optimizes a scalar functional of multiple variables using the Hooke-Jeeves method, by Arthur Kaupe. This is a version of ACM TOMS algorithm 178.


  1. John Nelder, Roger Mead,
    A simplex method for function minimization,
    Computer Journal,
    Volume 7, 1965, pages 308-313.
  2. R ONeill,
    Algorithm AS 47: Function Minimization Using a Simplex Procedure,
    Applied Statistics,
    Volume 20, Number 3, 1971, pages 338-345.

Source Code:

Last revised on 04 October 2015.