Prima has got a Python interface
github.com
github.com
https://fortran-lang.discourse.group/t/prima-has-got-a-pytho...
Thanks to the huge efforts of Nickolai Belakovski, PRIMA now has an official Python interface. It talks to Python via pybind11 and its C API instead of using F2PY.
I hope PRIMA will provide an example of binding modern Fortran libraries with Python.
Concerning Python, the next steps of PRIMA will be
- making PRIMA available on PyPI;
- making PRIMA available on Conda;
- getting PRIMA into SciPy (see https://github.com/libprima/prima/issues/112 ).
PRIMA is part of a research project funded by the Hong Kong Research Grants Council and the Department of Applied Mathematics (AMA) at the Hong Kong Polytechnic University (PolyU). The current version is ready to be used in Fortran, in C, in Python, in MATLAB, and in Julia.
------
Who was Powell? (from https://github.com/libprima/prima#who-was-powell)
Michael James David Powell FRS [1] was "a British numerical analyst who was among the pioneers of computational mathematics" [2]. He was the inventor/early contributor of quasi-Newton method [3], trust region method [4], augmented Lagrangian method [5], and SQP method [6]. Each of them is a pillar of modern numerical optimization. He also made significant contributions to approximation theory and methods [7].
Among numerous honors, Powell was one of the two recipients of the first Dantzig Prize [8] from the Mathematical Programming Society (MOS) and Society for Industrial and Applied Mathematics (SIAM). This is considered the highest award in optimization.
[1] https://en.wikipedia.org/wiki/Michael_J._D._Powell
[]https://royalsocietypublishing.org/doi/full/10.1098/rsbm.201...
[3] https://en.wikipedia.org/wiki/Quasi-Newton_method
[4] https://en.wikipedia.org/wiki/Trust_region
[5] https://en.wikipedia.org/wiki/Augmented_Lagrangian_method
[6] https://en.wikipedia.org/wiki/Sequential_quadratic_programmi...
[7] https://www.cambridge.org/highereducation/books/approximatio...
If you use method "cobyla" from scipy.optimize.minimize, then answer is now. PRIMA already performs far better (in terms of the number of function evaluations). See the comparison at https://github.com/libprima/prima#improvements .
The bugs are indeed only a secondary reason: they can only be triggered under special situations. They may not affect your usage at all (when it does affect you, the consequence is catastrophophic).
They're apparently also in discussion with the scipy team to include their implementation in scipy, so hopefully the question will be moot in the not too distant future